Function at 0x401090
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x4f4
mov eax, dword [0x42e800]
xor eax, esp
mov dword [esp + 0x4f0], eax
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push esi
push edi
push 0x3e7
lea eax, [esp + 0x11c]
push eax
xor ebx, ebx
push 1
push ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
call ebp
push eax
call fcn.00401000
push 0x40c1c0
call fcn.004018ba
push str.Sep_10_2012
push 0x196
lea ecx, [esp + 0x134]
push str.AA_600_US
push ecx
call fcn.004018ba
add esp, 0x24
push 0x3e7
lea edx, [esp + 0x11c]
push edx
push 2
push ebx
call ebp
push eax
call fcn.00401000
lea eax, [esp + 0x128]
push eax
call fcn.004018ba
lea eax, [esp + 0x64]
add esp, 0x14
mov byte [esp + 0x50], bl
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x401130
sub eax, edx
jne 0x40119d
lea ecx, [ecx]
push 0x3e7
lea ecx, [esp + 0x11c]
push ecx
push 3
push ebx
call ebp
push eax
call fcn.00401000
lea edx, [esp + 0x128]
push edx
call fcn.004018ba
lea eax, [esp + 0x64]
push eax
call fcn.004018a9
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x6c]
push 0x40c1a4
push edx
call fcn.00401636
lea eax, [esp + 0x74]
add esp, 0x24
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x401190
sub eax, edx
je 0x401140
mov eax, dword [esp + 0x14]
cmp eax, 0xa
push eax
jge 0x4011b6
push str.COM_i
lea eax, [esp + 0xbc]
push eax
jmp 0x4011c3
push str..COM_i
lea ecx, [esp + 0xbc]
push ecx
call fcn.00401553
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
lea edx, [esp + 0xcc]
push edx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x401256
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
lea eax, [esp + 0x68]
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x401256
push 0x3e7
lea ecx, [esp + 0x11c]
push ecx
push 6
push ebx
call ebp
push eax
call fcn.00401000
mov eax, dword [esp + 0x24]
add esp, 0x10
cmp eax, ebx
je 0x40123c
push eax
lea edx, [esp + 0x54]
push str.COM_i
push edx
call fcn.00401553
add esp, 0xc
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x11c]
push ecx
call fcn.004018ba
add esp, 8
jmp 0x4014b2
lea edx, [esp + 0x3c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetCommTimeouts]
lea eax, [esp + 0x3c]
push eax
push esi
mov dword [esp + 0x4c], 0x1388
call dword [sym.imp.KERNEL32.dll_SetCommTimeouts]
push 0x1000
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetupComm]
xor eax, eax
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], eax
push esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], 0x1c
call dword [sym.imp.KERNEL32.dll_GetCommState]
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x20]
and edx, 0xffffccc9
push eax
or edx, 1
push esi
mov dword [esp + 0x2c], 0x9600
mov byte [esp + 0x3a], 8
mov byte [esp + 0x3b], bl
mov byte [esp + 0x3c], bl
mov dword [esp + 0x30], edx
call dword [sym.imp.KERNEL32.dll_SetCommState]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x12c
call edi
push ebx
lea ecx, [esp + 0x1c]
push ecx
push 4
push str._n_nWR
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x3e7
lea edx, [esp + 0x11c]
push edx
push 4
push ebx
call ebp
push eax
call fcn.00401000
lea eax, [esp + 0x128]
push eax
call fcn.004018ba
add esp, 0x14
push 0x3e7
lea ecx, [esp + 0x11c]
push ecx
push 5
push ebx
call ebp
push eax
call fcn.00401000
lea edx, [esp + 0x128]
push edx
call fcn.004018ba
add esp, 0x14
push 0x64
call edi
push 0x40c1c0
call fcn.004018ba
add esp, 4
mov edi, 0x40
jmp 0x401380
push 0x40c184
call fcn.004018ba
add esp, 4
sub edi, 1
jne 0x401380
push 0x40c1c0
call fcn.004018ba
add esp, 4
nop
mov eax, 0x82082083
imul ebx
add edx, ebx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x7e0
mov ecx, ebx
sub ecx, eax
jne 0x4013cc
push 0x40c184
call fcn.004018ba
add esp, 4
push 0
lea edx, [esp + 0x1c]
push edx
push 0x10
lea edi, [ebx + section..data]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
jmp 0x4013f0
movzx edx, byte [edi + eax]
movzx cx, byte [ebx + eax + 0x40f001]
add cx, dx
movzx edx, byte [ebx + eax + 0x40f003]
add cx, dx
movzx edx, byte [ebx + eax + 0x40f002]
add cx, dx
add word [esp + 0x10], cx
add eax, 4
cmp eax, 0x10
jl 0x4013f0
cmp bl, 0xf0
jne 0x401461
push 0
lea eax, [esp + 0x1c]
push eax
push 2
lea ecx, [esp + 0x28]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], 0
je 0x4014fb
mov ax, word [esp + 0x1c]
cmp al, byte [esp + 0x10]
jne 0x40151e
cmp ah, byte [esp + 0x11]
jne 0x40151e
add ebx, 0x10
cmp ebx, 0x1f800
jl 0x4013a0
push 0x40c1c0
call fcn.004018ba
add esp, 4
push 0x3e7
lea eax, [esp + 0x11c]
push eax
push 8
push 0
call ebp
push eax
call fcn.00401000
lea ecx, [esp + 0x128]
push ecx
call fcn.004018ba
add esp, 0x14
cmp esi, 0xffffffff
je 0x4014b2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x3e7
lea edx, [esp + 0x11c]
push edx
push 7
push 0
call ebp
push eax
call fcn.00401000
lea eax, [esp + 0x128]
push eax
call fcn.004018ba
add esp, 0x14
call fcn.0040b564
mov ecx, dword [esp + 0x500]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00401544
add esp, 0x4f4
ret
push 0x3e7
lea edx, [esp + 0x11c]
push edx
push 0xa
push 0
call ebp
push eax
call fcn.00401000
lea eax, [esp + 0x128]
push eax
jmp 0x40149e
push 0x3e7
lea ecx, [esp + 0x11c]
push ecx
push 9
push 0
call ebp
push eax
call fcn.00401000
lea edx, [esp + 0x128]
push edx
jmp 0x40149e