Function at 0x468040
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4b8730
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebp
push esi
push edi
mov eax, dword [0x4e3f80]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], 0
mov esi, dword [ebx + 0x14]
mov dword [eax], 0
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx - 0xc]
dec eax
push eax
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x3c]
call fcn.004082d0
mov byte [esp + 0x2c], 1
test esi, esi
je 0x468187
xor eax, eax
cmp dword [esp + 0x38], eax
setne al
mov dword [esp + 0x1c], eax
jmp 0x4680b5
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x1c], 0
mov ecx, dword [esi]
mov eax, esi
mov esi, dword [eax + 8]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], esi
je 0x4681eb
mov edx, dword [esp + 0x38]
mov eax, dword [esi]
push edx
push eax
call fcn.0049de7f
add esp, 8
test eax, eax
jne 0x46817c
mov ecx, dword [ebx]
push eax
push eax
mov eax, dword [esi + 8]
add eax, dword [ebx + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 4]
cmp eax, 0x100000
jae 0x46810b
mov edi, eax
mov dword [esp + 0x10], edi
jmp 0x468117
mov dword [esp + 0x10], 0x100000
mov edi, dword [esp + 0x10]
lea edx, [edi + 1]
push edx
call fcn.00490828
add esp, 4
mov dword [esp + 0x14], eax
xor esi, esi
cmp edi, 0x20000
mov eax, edi
jl 0x468138
mov eax, 0x20000
mov edx, dword [ebx]
push 0
push ebp
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esi + eax]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x468160
mov eax, dword [ebp]
sub edi, eax
add esi, eax
test edi, edi
jle 0x468160
test eax, eax
jne 0x468129
mov ecx, dword [esp + 0x10]
mov dword [ebp], esi
cmp esi, ecx
je 0x4681f5
mov eax, dword [esp + 0x14]
push eax
call fcn.0049081d
add esp, 4
cmp dword [esp + 0x18], 0
jne 0x4680b1
mov byte [esp + 0x2c], 0
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4681ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4681d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x20
ret 0xc
push 0x80004005
call fcn.004010d0
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov byte [esi + edi], 0
mov eax, dword [edx + 4]
cmp ecx, eax
jae 0x468217
sub eax, ecx
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x3c]
mov dword [eax], 1
mov byte [esp + 0x2c], 0
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46823c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x2c], 0xffffffff
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x468264
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x20
ret 0xc