Function at 0x20403190
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x2047bba5
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov eax, dword [0x204a31e0]
xor eax, esp
push eax
lea eax, [esp + 0x54]
mov dword fs:[0], eax
push 0x120
call dword [sym.imp.MSVCR80.dll_malloc]
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x2040337f
mov eax, dword [esp + 0x64]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
mov dword [esi + 0x44], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x68], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 4], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], ebx
mov dword [esi + 0x74], 1
mov ebp, 0xbb8
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x2040327e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
je 0x20403233
cmp eax, 2
jne 0x20403277
cmp ebp, ebx
jle 0x20403277
cmp ebp, 0x258
mov eax, ebp
jl 0x20403246
mov eax, 0x258
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x64]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push ecx
sub ebp, 0x258
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x20403223
jmp 0x2040327e
cmp edi, 0xffffffff
jne 0x2040327e
xor edi, edi
cmp edi, ebx
mov dword [esi], edi
jne 0x20403290
push esi
call dword [sym.imp.MSVCR80.dll_free]
jmp 0x2040337c
lea edx, [esp + 0x20]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x204032b6
lea eax, [esp + 0x18]
test eax, eax
je 0x204032bf
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x1c], ecx
jmp 0x204032c3
mov dword [esi + 0x10], 0xffffffff
jmp 0x204032c6
mov eax, dword [esp + 0x18]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x10]
push eax
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
cmp eax, ebx
mov dword [esi + 4], eax
je 0x20403366
mov ecx, dword [esi + 0x10]
mov edx, dword [esi]
push ebx
lea edi, [esp + 0x1c]
push edi
push ecx
push eax
push edx
mov dword [esi + 8], 1
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x20403366
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
je 0x20403366
cmp eax, dword [esi + 0x10]
jne 0x20403366
mov eax, dword [esi]
cmp eax, ebx
je 0x20403318
call fcn.20439880
mov dword [esi], ebx
cmp dword [esi + 0x74], ebx
je 0x20403331
mov eax, dword [esi + 0x10]
cmp eax, ebx
jbe 0x20403331
mov ecx, dword [esi + 4]
push eax
push ecx
call fcn.20405870
add esp, 8
mov dword [esi + 0xc], ebx
lea eax, [esi + 0xf8]
mov dword [esp + 0x5c], ebx
cmp eax, ebx
je 0x20403348
push eax
call fcn.204030b0
mov dword [esp + 0x5c], 0xffffffff
mov eax, esi
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret
mov eax, dword [esi + 0x28]
cmp eax, ebx
mov edi, dword [sym.imp.MSVCR80.dll_free]
je 0x20403379
push eax
call edi
add esp, 4
push esi
call edi
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret