Function at 0x408aac
Capabilities:
Write file on windows

Disassembly:
mov edi, 0x40bcf0
mov ecx, 0x40e290
sub ecx, edi
sub ecx, 4
shr ecx, 2
sub eax, eax
rep stosd dword es:[edi], eax
push 0x20000
push 0
call sub.KERNEL32.dll_GlobalAlloc
mov dword [0x40b710], eax
test eax, eax
jne 0x408af6
call sub.KERNEL32.dll_GetLastError
mov dword [0x40bc70], eax
push str.INITSTRINGS:_failed_to_allocate_memory_
call fcn.004018d4
push dword [0x40bc70]
call sub.KERNEL32.dll_ExitProcess
mov ebx, eax
mov byte [ebx], 0
push 0x10000
push 0
call sub.KERNEL32.dll_GlobalAlloc
mov dword [0x40bb50], eax
test eax, eax
jne 0x408b2f
call sub.KERNEL32.dll_GetLastError
mov dword [0x40bc70], eax
push str.INITSTRINGS:_failed_to_allocate_memory_
call fcn.004018d4
push dword [0x40bc70]
call sub.KERNEL32.dll_ExitProcess
mov ebx, eax
mov byte [ebx], 0
mov eax, 0xffffffff
sub eax, eax
mov al, 0
mov byte [0x40b714], al
mov byte [0x40b820], al
mov byte [0x40b930], al
mov byte [0x40ba40], al
mov byte [0x40bb54], al
mov eax, 0xffffffff
mov dword [0x40bc74], eax
mov dword [0x40bc78], eax
mov dword [0x40bc7c], eax
mov dword [0x40e26a], 0
sub eax, eax
mov edi, 0x40c26a
mov ecx, 0x200
rep stosd dword es:[edi], eax
push 0x81410
push 0x40
call sub.KERNEL32.dll_GlobalAlloc
mov dword [0x40bcd2], eax
mov dword [0x40e26e], eax
add dword [0x40e26e], 0x81010
mov dword [0x40c094], eax
add eax, 4
mov dword [0x40c098], eax
add eax, 4
mov dword [0x40c09c], eax
add eax, 0x404
mov dword [0x40c0a0], eax
add eax, 0x404
mov dword [0x40c0a4], eax
add eax, 0x404
mov dword [0x40c0a8], eax
add eax, 0x404
mov dword [0x40c25a], eax
mov dword [0x40c25e], eax
mov esi, 0x40bcf0
mov dword [0x40bcda], 0
call fcn.00402a30
call fcn.00401f35
call fcn.00401df7
mov dword [esi], 0
push dword [esi]
call sub.KERNEL32.dll_GetModuleHandleA
call fcn.00401ea4
mov dword [0x40c05c], eax
mov eax, 0xffffffff
mov dword [0x40c068], eax
mov eax, 0
mov dword [0x40c06c], eax
mov eax, 0x3e7
mov dword [0x40c070], eax
mov eax, 0x3e7
mov dword [0x40c074], eax
call fcn.00401df7
mov dword [esi], 0
add esi, 4
push pe_overlay
push 0x40a20d
push dword [0x40c25a]
call sym._Top002B
mov ecx, dword [0x40c25a]
mov dword [esi], ecx
push ecx
add esi, 4
add eax, 0x1000
add dword [0x40c25a], eax
sub esi, 4
push dword [esi]
push dword [esi - 4]
call sub.USER32.dll_FindWindowA
sub esi, 4
pop dword [0x40c25a]
call fcn.00401ea4
mov dword [esi], eax
mov dword [0x40c060], eax
cmp dword [esi], 0
je 0x408cd6
push dword [0x40c060]
call sub.USER32.dll_IsIconic
test eax, eax
je 0x408cbe
push 9
push dword [0x40c060]
call sub.USER32.dll_ShowWindow
push dword [0x40c060]
call sub.USER32.dll_SetForegroundWindow
mov dword [esi], 0
push dword [esi]
call sub.KERNEL32.dll_ExitProcess
push 0x404
push str.COM2
push dword [0x40c09c]
call sym._Top002B
mov dword [esi], 1
push pe_overlay
push dword [0x40c25a]
push dword [esi]
call fcn.00401fa9
push pe_overlay
push dword [0x40c25a]
call fcn.00402785
add eax, dword [0x40c25a]
add eax, 1
mov dword [0x40c25e], eax
mov byte [eax], 0
sub edx, edx
call fcn.00401df7
push pe_overlay
push 0x40a426
push dword [0x40c25a]
call sym._Top002B
mov ecx, dword [0x40c25a]
mov dword [0x40c25e], ecx
mov ebx, dword [0x40e26a]
sub ebx, 1
mov ebx, dword [ebx*4 + 0x40c26a]
sub edx, edx
push pe_overlay
push pe_overlay
push ebx
push ecx
call fcn.004027c2
je 0x408db7
push pe_overlay
push str._COM1
push dword [0x40c25a]
call sym._Top002B
mov ecx, dword [0x40c25a]
mov dword [0x40c25e], ecx
mov ebx, dword [0x40e26a]
sub ebx, 1
mov ebx, dword [ebx*4 + 0x40c26a]
sub edx, edx
push pe_overlay
push pe_overlay
push ebx
push ecx
call fcn.004027c2
je 0x408db7
call fcn.00401ea4
jne 0x408dd3
push 0x404
push str.COM1
push dword [0x40c09c]
call sym._Top002B
call fcn.00401df7
push pe_overlay
push dword [0x40c09c]
push dword [0x40c25a]
call sym._Top002B
mov ecx, dword [0x40c25a]
mov dword [esi], ecx
push ecx
add esi, 4
add eax, 0x1000
add dword [0x40c25a], eax
mov eax, 0x80000000
mov dword [esi], eax
mov eax, 0x40000000
or dword [esi], eax
add esi, 4
mov dword [esi], 0
add esi, 4
mov dword [esi], 0
add esi, 4
mov eax, 3
mov dword [esi], eax
add esi, 4
mov dword [esi], 0
add esi, 4
push 0
sub esi, 4
push dword [esi]
sub esi, 4
push dword [esi]
sub esi, 4
push dword [esi]
sub esi, 4
push dword [esi]
sub esi, 4
push dword [esi]
sub esi, 4
push dword [esi]
call sub.KERNEL32.dll_CreateFileA
pop dword [0x40c25a]
call fcn.00401ea4
mov dword [0x40c088], eax
mov eax, dword [0x40c088]
cmp eax, 0xffffffff
jne 0x408ee4
call fcn.00401df7
push pe_overlay
push str.attempting_to_open
push dword [0x40c25a]
call sym._Top002B
push pe_overlay
push dword [0x40c09c]
push dword [0x40c25a]
call fcn.0040264d
mov ecx, dword [0x40c25a]
mov dword [esi], ecx
add esi, 4
push dword [0x40c25a]
add eax, 0x1000
add dword [0x40c25a], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c25a], ecx
call fcn.00401ea4
mov eax, 0x1c
mov dword [0x40c22a], eax
push 0x40c22a
push dword [0x40c088]
call sub.KERNEL32.dll_GetCommState
test eax, eax
jne 0x408f53
call fcn.00401df7
push pe_overlay
push str._GetCommState_
push dword [0x40c25a]
call sym._Top002B
mov ecx, dword [0x40c25a]
mov dword [esi], ecx
add esi, 4
push dword [0x40c25a]
add eax, 0x1000
add dword [0x40c25a], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c25a], ecx
call fcn.00401ea4
mov eax, 0x2580
mov dword [0x40c22e], eax
mov eax, 8
mov byte [0x40c23c], al
mov eax, 0
mov byte [0x40c23d], al
mov eax, 0
mov byte [0x40c23e], al
mov eax, 0x1011
mov dword [0x40c232], eax
push 0x40c22a
push dword [0x40c088]
call sub.KERNEL32.dll_SetCommState
test eax, eax
jne 0x408fea
call fcn.00401df7
push pe_overlay
push str._SetCommState_
push dword [0x40c25a]
call sym._Top002B
mov ecx, dword [0x40c25a]
mov dword [esi], ecx
add esi, 4
push dword [0x40c25a]
add eax, 0x1000
add dword [0x40c25a], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c25a], ecx
call fcn.00401ea4
mov eax, 0xffffffff
mov dword [0x40c246], eax
sub eax, eax
mov dword [0x40c24a], eax
sub eax, eax
mov dword [0x40c24e], eax
sub eax, eax
mov dword [0x40c252], eax
sub eax, eax
mov dword [0x40c256], eax
push 0x40c246
push dword [0x40c088]
call sub.KERNEL32.dll_SetCommTimeouts
test eax, eax
jne 0x409075
call fcn.00401df7
push pe_overlay
push str._SetCommTimeouts_
push dword [0x40c25a]
call sym._Top002B
mov ecx, dword [0x40c25a]
mov dword [esi], ecx
add esi, 4
push dword [0x40c25a]
add eax, 0x1000
add dword [0x40c25a], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c25a], ecx
call fcn.00401ea4
push 0
push 0x407a4a
push 0
push 0x66
push dword [0x40bcce]
call sub.USER32.dll_DialogBoxParamA
push dword [0x40c088]
call sub.KERNEL32.dll_CloseHandle
sub eax, eax
push eax
push esi
push dword [0x40bcd2]
call sub.KERNEL32.dll_GlobalFree
pop eax
sub eax, 0x40bcf0
je 0x409120
mov dword [0x40bc60], eax
push ecx
push pe_overlay
push 0x40b3d9
call fcn.00401000
push 0
push 0x40bc68
push eax
push 0x40b3d9
push dword [0x40bc78]
call sub.KERNEL32.dll_WriteFile
pop ecx
mov eax, dword [0x40bc68]
push esi
mov esi, dword [0x40bc60]
call fcn.004010fc
pop esi
push ecx
push pe_overlay
push 0x40bc80
call fcn.00401000
push 0
push 0x40bc68
push eax
push 0x40bc80
push dword [0x40bc78]
call sub.KERNEL32.dll_WriteFile
pop ecx
mov eax, dword [0x40bc68]
call sym.atof_ExpNoPlus
push dword [0x40bb50]
call sub.KERNEL32.dll_GlobalFree
push dword [0x40b710]
call sub.KERNEL32.dll_GlobalFree
pop eax
push eax
call sub.KERNEL32.dll_ExitProcess
int3