Function at 0x4020d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x417088]
xor eax, ebp
mov dword [ebp - 0x14], eax
push str._syshost.exe
mov eax, dword [ebp + 8]
push eax
call fcn.00405d34
add esp, 8
test eax, eax
je 0x402187
xor ecx, ecx
mov word [ebp - 0x220], cx
push 0x206
push 0
lea edx, [ebp - 0x21e]
push edx
call fcn.004058e0
add esp, 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x220]
push ecx
call fcn.00405acc
add esp, 8
push 0x5c
lea edx, [ebp - 0x220]
push edx
call fcn.00405d06
add esp, 8
mov dword [ebp - 0x10], eax
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov word [ecx], ax
push str.mfc42.dll
lea edx, [ebp - 0x220]
push edx
call fcn.00405a9b
add esp, 8
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Roamingee
mov edx, dword [ebp + 8]
push edx
call fcn.00405d34
add esp, 8
test eax, eax
jne 0x4021c6
push 0x412558
mov eax, dword [ebp + 8]
push eax
call fcn.00405d34
add esp, 8
test eax, eax
jne 0x4021c6
push str.AFXDK_S1
mov ecx, dword [ebp + 8]
push ecx
call fcn.00405d34
add esp, 8
test eax, eax
je 0x4021d0
mov eax, 1
jmp 0x40253c
push str.putty.exe
mov edx, dword [ebp + 8]
push edx
call fcn.00405d34
add esp, 8
test eax, eax
je 0x4021ec
xor eax, eax
jmp 0x40253c
mov dword [ebp - 8], 0
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x40253a
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x500000
jbe 0x402238
mov dword [ebp - 8], 0x500000
push 4
push 0x3000
mov edx, dword [ebp - 8]
add edx, 0x400
push edx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x224], eax
push 0
lea eax, [ebp - 0x228]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x224]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x22c], 0
jmp 0x40229a
mov edx, dword [ebp - 0x22c]
add edx, 1
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 0x22c]
cmp eax, dword [ebp - 8]
jae 0x402526
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x22c]
movzx edx, byte [ecx + 2]
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x22c]
movzx ecx, byte [eax]
add ecx, 4
cmp edx, ecx
jne 0x402521
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x22c]
movzx eax, byte [edx + 4]
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x22c]
movzx edx, byte [ecx]
add edx, 1
cmp eax, edx
jne 0x402521
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x22c]
movzx ecx, byte [eax + 6]
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x22c]
movzx eax, byte [edx]
sub eax, 2
cmp ecx, eax
jne 0x402521
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x22c]
movzx edx, byte [ecx + 8]
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x22c]
movzx ecx, byte [eax]
sub ecx, 3
cmp edx, ecx
jne 0x402521
mov edx, dword [ebp - 0x22c]
add edx, 0x5000
mov dword [ebp - 0x230], edx
jmp 0x402374
mov eax, dword [ebp - 0x230]
add eax, 1
mov dword [ebp - 0x230], eax
mov ecx, dword [ebp - 0x230]
cmp ecx, dword [ebp - 8]
jae 0x402521
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x230]
movzx eax, byte [edx + 2]
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x230]
movzx edx, byte [ecx]
add edx, 4
cmp eax, edx
jne 0x40251c
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x230]
movzx ecx, byte [eax + 4]
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x230]
movzx eax, byte [edx]
add eax, 1
cmp ecx, eax
jne 0x40251c
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x230]
movzx edx, byte [ecx + 6]
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x230]
movzx ecx, byte [eax]
sub ecx, 2
cmp edx, ecx
jne 0x40251c
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x230]
movzx eax, byte [edx + 8]
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x230]
movzx edx, byte [ecx]
sub edx, 3
cmp eax, edx
jne 0x40251c
mov eax, dword [ebp - 0x230]
mov dword [ebp - 0x234], eax
jmp 0x402448
mov ecx, dword [ebp - 0x234]
add ecx, 1
mov dword [ebp - 0x234], ecx
mov edx, dword [ebp - 0x230]
add edx, 0xc8
cmp dword [ebp - 0x234], edx
jae 0x40251c
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x234]
movzx ecx, byte [eax + 2]
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x234]
movzx eax, byte [edx]
sub eax, 4
cmp ecx, eax
jne 0x402517
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x234]
movzx edx, byte [ecx + 4]
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x234]
movzx ecx, byte [eax]
sub ecx, 1
cmp edx, ecx
jne 0x402517
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x234]
movzx eax, byte [edx + 6]
mov ecx, dword [ebp - 0x224]
add ecx, dword [ebp - 0x234]
movzx edx, byte [ecx]
add edx, 2
cmp eax, edx
jne 0x402517
mov eax, dword [ebp - 0x224]
add eax, dword [ebp - 0x234]
movzx ecx, byte [eax + 8]
mov edx, dword [ebp - 0x224]
add edx, dword [ebp - 0x234]
movzx eax, byte [edx]
add eax, 3
cmp ecx, eax
jne 0x402517
push 0x8000
push 0
mov ecx, dword [ebp - 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 1
jmp 0x40253c
jmp 0x402439
jmp 0x402365
jmp 0x40228b
push 0x8000
push 0
mov edx, dword [ebp - 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00405605
mov esp, ebp
pop ebp
ret