Function at 0x4021c0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40739b
push eax
mov dword fs:[0], esp
sub esp, 0x158
lea eax, [esp]
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push eax
xor ebx, ebx
xor edi, edi
call fcn.00402410
mov esi, eax
cmp esi, ebx
jl 0x40239d
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40239b
shl eax, 4
push eax
push 8
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [ebp + 4], eax
jne 0x40222c
mov esi, 0x8007000e
jmp 0x40239d
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
cmp eax, ebx
jbe 0x40239b
mov dword [esp + 0x14], ebx
mov eax, dword [ebp]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x1c]
push ebx
push ecx
lea edx, [esp + 0x28]
push 0x2e
push edx
push eax
call esi
test eax, eax
je 0x4023de
cmp dword [esp + 0x20], 0x2014b50
jne 0x4023fc
cmp word [esp + 0x2a], bx
jne 0x40237b
test byte [esp + 0x28], 1
jne 0x40237b
mov eax, dword [esp + 0x3c]
cmp ax, 0x104
jae 0x402295
lea edi, [esp + 0x64]
jmp 0x4022b8
and eax, 0xffff
inc eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
je 0x402403
mov eax, dword [esp + 0x3c]
mov edx, dword [ebp]
lea ecx, [esp + 0x1c]
push ebx
and eax, 0xffff
push ecx
push eax
push edi
push edx
call esi
test eax, eax
je 0x4023fc
mov eax, dword [esp + 0x3c]
and eax, 0xffff
mov byte [eax + edi], bl
mov eax, dword [esp + 0x3e]
mov ecx, dword [esp + 0x40]
and eax, 0xffff
and ecx, 0xffff
add eax, ecx
je 0x402304
mov edx, dword [ebp]
push 1
push ebx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 4]
mov ecx, dword [esp + 0x14]
inc edx
add esi, ecx
push edi
lea ecx, [esp + 0x54]
mov dword [ebp + 8], edx
call fcn.00401b80
mov ecx, eax
mov dword [esp + 0x170], ebx
call fcn.00401c70
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
lea ecx, [esp + 0x50]
mov dword [esi], eax
mov dword [esp + 0x170], 0xffffffff
call fcn.00401bc0
lea eax, [esp + 0x64]
cmp edi, eax
je 0x402362
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor edi, edi
cmp dword [esi], ebx
je 0x402403
mov ecx, dword [esp + 0x4a]
mov dword [esi + 4], ecx
mov edx, dword [esp + 0x34]
mov dword [esi + 8], edx
mov dword [esi + 0xc], ebx
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
inc eax
add edx, 0x10
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
jb 0x402240
xor esi, esi
cmp edi, ebx
je 0x4023b8
lea eax, [esp + 0x64]
cmp edi, eax
je 0x4023b8
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp esi, ebx
jge 0x4023c3
mov ecx, ebp
call fcn.00402150
mov ecx, dword [esp + 0x168]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x164
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x40239b
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x40239d
mov esi, 0x80004005
jmp 0x40239d
mov esi, 0x8007000e
jmp 0x40239d