Function at 0x408d85
Capabilities:
Write file on windows

Disassembly:
mov edi, 0x40bcf0
mov ecx, 0x40e2a0
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 0x408dcf
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 0x408e08
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 [0x40e276], 0
sub eax, eax
mov edi, 0x40c276
mov ecx, 0x200
rep stosd dword es:[edi], eax
push 0x8100c
push 0x40
call sub.KERNEL32.dll_GlobalAlloc
mov dword [0x40bcd2], eax
mov dword [0x40e27a], eax
add dword [0x40e27a], 0x80c0c
mov dword [0x40c0a4], eax
add eax, 4
mov dword [0x40c0a8], eax
add eax, 4
mov dword [0x40c0ac], eax
add eax, 0x404
mov dword [0x40c0b0], eax
add eax, 0x404
mov dword [0x40c0b4], eax
add eax, 0x404
mov dword [0x40c266], eax
mov dword [0x40c26a], 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
mov eax, 0
mov dword [0x40c088], eax
call fcn.00401df7
mov dword [esi], 0
add esi, 4
push pe_overlay
push 0x40a22d
push dword [0x40c266]
call sym._Top002B
mov ecx, dword [0x40c266]
mov dword [esi], ecx
push ecx
add esi, 4
add eax, 0x1000
add dword [0x40c266], eax
sub esi, 4
push dword [esi]
push dword [esi - 4]
call sub.USER32.dll_FindWindowA
sub esi, 4
pop dword [0x40c266]
call fcn.00401ea4
mov dword [esi], eax
mov dword [0x40c060], eax
cmp dword [esi], 0
je 0x408faf
push dword [0x40c060]
call sub.USER32.dll_IsIconic
test eax, eax
je 0x408f97
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 0xff0000
call fcn.004095aa
mov dword [0x40c094], eax
push 0x404
push str.COM2
push dword [0x40c0ac]
call sym._Top002B
mov dword [esi], 1
push pe_overlay
push dword [0x40c266]
push dword [esi]
call fcn.00401fa9
push pe_overlay
push dword [0x40c266]
call fcn.00402785
add eax, dword [0x40c266]
add eax, 1
mov dword [0x40c26a], eax
mov byte [eax], 0
sub edx, edx
call fcn.00401df7
push pe_overlay
push 0x40a446
push dword [0x40c266]
call sym._Top002B
mov ecx, dword [0x40c266]
mov dword [0x40c26a], ecx
mov ebx, dword [0x40e276]
sub ebx, 1
mov ebx, dword [ebx*4 + 0x40c276]
sub edx, edx
push pe_overlay
push pe_overlay
push ebx
push ecx
call fcn.004027c2
je 0x40909f
push pe_overlay
push str._COM1
push dword [0x40c266]
call sym._Top002B
mov ecx, dword [0x40c266]
mov dword [0x40c26a], ecx
mov ebx, dword [0x40e276]
sub ebx, 1
mov ebx, dword [ebx*4 + 0x40c276]
sub edx, edx
push pe_overlay
push pe_overlay
push ebx
push ecx
call fcn.004027c2
je 0x40909f
call fcn.00401ea4
jne 0x4090bb
push 0x404
push str.COM1
push dword [0x40c0ac]
call sym._Top002B
call fcn.00401df7
push pe_overlay
push dword [0x40c0ac]
push dword [0x40c266]
call sym._Top002B
mov ecx, dword [0x40c266]
mov dword [esi], ecx
push ecx
add esi, 4
add eax, 0x1000
add dword [0x40c266], 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 [0x40c266]
call fcn.00401ea4
mov dword [0x40c098], eax
mov eax, dword [0x40c098]
cmp eax, 0xffffffff
jne 0x4091cc
call fcn.00401df7
push pe_overlay
push str.attempting_to_open
push dword [0x40c266]
call sym._Top002B
push pe_overlay
push dword [0x40c0ac]
push dword [0x40c266]
call fcn.0040264d
mov ecx, dword [0x40c266]
mov dword [esi], ecx
add esi, 4
push dword [0x40c266]
add eax, 0x1000
add dword [0x40c266], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c266], ecx
call fcn.00401ea4
mov eax, 0x1c
mov dword [0x40c236], eax
push 0x40c236
push dword [0x40c098]
call sub.KERNEL32.dll_GetCommState
test eax, eax
jne 0x40923b
call fcn.00401df7
push pe_overlay
push str._GetCommState_
push dword [0x40c266]
call sym._Top002B
mov ecx, dword [0x40c266]
mov dword [esi], ecx
add esi, 4
push dword [0x40c266]
add eax, 0x1000
add dword [0x40c266], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c266], ecx
call fcn.00401ea4
mov eax, 0x2580
mov dword [0x40c23a], eax
mov eax, 8
mov byte [0x40c248], al
mov eax, 0
mov byte [0x40c249], al
mov eax, 0
mov byte [0x40c24a], al
mov eax, 0x1011
mov dword [0x40c23e], eax
push 0x40c236
push dword [0x40c098]
call sub.KERNEL32.dll_SetCommState
test eax, eax
jne 0x4092d2
call fcn.00401df7
push pe_overlay
push str._SetCommState_
push dword [0x40c266]
call sym._Top002B
mov ecx, dword [0x40c266]
mov dword [esi], ecx
add esi, 4
push dword [0x40c266]
add eax, 0x1000
add dword [0x40c266], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c266], ecx
call fcn.00401ea4
mov eax, 0xffffffff
mov dword [0x40c252], eax
sub eax, eax
mov dword [0x40c256], eax
sub eax, eax
mov dword [0x40c25a], eax
sub eax, eax
mov dword [0x40c25e], eax
sub eax, eax
mov dword [0x40c262], eax
push 0x40c252
push dword [0x40c098]
call sub.KERNEL32.dll_SetCommTimeouts
test eax, eax
jne 0x40935d
call fcn.00401df7
push pe_overlay
push str._SetCommTimeouts_
push dword [0x40c266]
call sym._Top002B
mov ecx, dword [0x40c266]
mov dword [esi], ecx
add esi, 4
push dword [0x40c266]
add eax, 0x1000
add dword [0x40c266], eax
mov eax, 0
push eax
call fcn.00404640
sub esi, 4
mov ecx, dword [esi]
mov dword [0x40c266], ecx
call fcn.00401ea4
push 0
push 0x407b7f
push 0
push 0x66
push dword [0x40bcce]
call sub.USER32.dll_DialogBoxParamA
push dword [0x40c094]
call sub.GDI32.dll_DeleteObject
push dword [0x40c098]
call fcn.00409430
sub eax, eax
push eax
push esi
push dword [0x40bcd2]
call sub.KERNEL32.dll_GlobalFree
pop eax
sub eax, 0x40bcf0
je 0x409413
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