Function at 0x440150
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c0620
mov eax, dword fs:[0]
push eax
sub esp, 0x1d4
mov eax, dword [0x5210b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x68]
mov ebx, dword [ebp + 8]
cmp eax, 2
jae 0x440273
push 0x138
lea eax, [ebp - 0x1a8]
push 0
push eax
call fcn.0049e210
add esp, 0xc
mov dword [ebp - 0x1dc], 0
lea eax, [ebp - 0x1dc]
push 0
push eax
push 0x138
lea eax, [ebp - 0x1a8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4401da
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x44055d
cmp dword [ebp - 0x1dc], 0x138
jne 0x44037b
push 1
lea eax, [ebp - 0x1dd]
push eax
lea eax, [ebp - 0x1a8]
push eax
lea ecx, [ebp - 0x70]
call fcn.00409920
mov dword [ebp - 4], 0
lea ecx, [esi + 4]
lea eax, [ebp - 0x6c]
cmp ecx, eax
je 0x44021d
push 0xffffffffffffffff
push 0
push eax
call fcn.004044f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70]
call fcn.00404be0
mov eax, dword [ebp - 0xa4]
mov dword [esi + 0x30], eax
movzx eax, word [ebp - 0xa0]
mov word [esi + 0x34], ax
mov eax, dword [ebp - 0x9c]
mov dword [esi + 0x38], eax
mov eax, dword [ebp - 0x98]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x94]
mov dword [esi + 0x40], eax
movzx eax, word [ebp - 0x90]
mov word [esi + 0x44], ax
mov eax, dword [ebp + 0xc]
add eax, 0x138
jmp 0x440558
cmp eax, 4
jae 0x4403e9
xor eax, eax
push eax
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1b4], eax
mov dword [ebp - 0x1b0], eax
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1dc], eax
lea eax, [ebp - 0x1dc]
push eax
push 0x18
lea eax, [ebp - 0x1c0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4401cf
cmp dword [ebp - 0x1dc], 0x18
jne 0x44037b
mov eax, dword [ebp - 0x1bc]
push dword [ebp - 0x1c0]
mov dword [esi + 0x30], eax
movzx eax, word [ebp - 0x1b8]
mov word [esi + 0x34], ax
mov eax, dword [ebp - 0x1b6]
mov dword [esi + 0x38], eax
mov eax, dword [ebp - 0x1b2]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x1ae]
mov dword [esi + 0x40], eax
movzx eax, word [ebp - 0x1aa]
mov word [esi + 0x44], ax
call fcn.0049c24e
push dword [ebp - 0x1c0]
mov edi, eax
push 0
push edi
call fcn.0049e210
add esp, 0x10
lea eax, [ebp - 0x1dc]
push 0
push eax
push dword [ebp - 0x1c0]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x440362
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 1
push edi
mov esi, eax
call fcn.0049c240
add esp, 8
mov eax, esi
jmp 0x44055d
mov eax, dword [ebp - 0x1c0]
cmp dword [ebp - 0x1dc], eax
je 0x440385
push 1
push edi
call fcn.0049c240
add esp, 8
mov eax, 0x103
jmp 0x44055d
push 0
shr eax, 1
lea ecx, [ebp - 0x1dd]
push ecx
push eax
test edi, edi
mov dword [ebp - 0x40], 0x4e1680
mov eax, 0x4db368
mov dword [ebp - 0x18], 0x4e1670
cmovne eax, edi
lea ecx, [ebp - 0x40]
push eax
call fcn.00406ec0
mov dword [ebp - 4], 3
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.00403fd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00404be0
push 1
push edi
call fcn.0049c240
mov eax, dword [ebp - 0x1c0]
add eax, 0x18
jmp 0x440552
push 0x30
lea eax, [ebp - 0x1d8]
push 0
push eax
call fcn.0049e210
add esp, 0xc
mov dword [ebp - 0x1dc], 0
lea eax, [ebp - 0x1dc]
push 0
push eax
push 0x30
lea eax, [ebp - 0x1d8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4401cf
cmp dword [ebp - 0x1dc], 0x30
jne 0x44037b
mov eax, dword [ebp - 0x1d4]
mov dword [esi + 0x30], eax
movzx eax, word [ebp - 0x1d0]
push dword [ebp - 0x1d8]
mov word [esi + 0x34], ax
mov eax, dword [ebp - 0x1ce]
mov dword [esi + 0x38], eax
mov eax, dword [ebp - 0x1ca]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x1c6]
mov dword [esi + 0x40], eax
movzx eax, word [ebp - 0x1c2]
mov word [esi + 0x44], ax
mov eax, dword [ebp - 0x1c0]
mov dword [esi + 0x4c], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esi + 0x50], eax
mov eax, dword [ebp - 0x1b8]
mov dword [esi + 0x54], eax
mov eax, dword [ebp - 0x1b4]
mov dword [esi + 0x58], eax
mov eax, dword [ebp - 0x1b0]
mov dword [esi + 0x5c], eax
mov eax, dword [ebp - 0x1ac]
mov dword [esi + 0x60], eax
call fcn.0049c24e
push dword [ebp - 0x1d8]
mov edi, eax
push 0
push edi
call fcn.0049e210
add esp, 0x10
lea eax, [ebp - 0x1dc]
push 0
push eax
push dword [ebp - 0x1d8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x440348
mov eax, dword [ebp - 0x1d8]
cmp dword [ebp - 0x1dc], eax
jne 0x440370
push 0
shr eax, 1
lea ecx, [ebp - 0x1dd]
push ecx
push eax
test edi, edi
mov dword [ebp - 0x40], 0x4e1680
mov eax, 0x4db368
mov dword [ebp - 0x18], 0x4e1670
cmovne eax, edi
lea ecx, [ebp - 0x40]
push eax
call fcn.00406ec0
mov dword [ebp - 4], 6
lea eax, [ebp - 0x40]
push eax
mov ecx, esi
call fcn.00403fd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.00404be0
push 1
push edi
call fcn.0049c240
mov eax, dword [ebp - 0x1d8]
add eax, 0x30
add esp, 8
add eax, dword [ebp + 0xc]
mov dword [esi + 0x48], eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049c22a
mov esp, ebp
pop ebp
ret 8