Function at 0x43df70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
push edi
test eax, eax
je 0x43dfa2
mov dword [eax], 0
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x43e198
cmp byte [esi + 0x1c], 0
je 0x43e1f4
cmp byte [esi + 0x1d], 0
je 0x43e010
mov ebx, dword [esi + 0x2c]
mov edx, dword [esi + 0x24]
mov edi, dword [esi + 0x28]
mov eax, dword [esi + 0x20]
cmp ebx, edx
jb 0x43dff8
ja 0x43dfd3
cmp edi, eax
jb 0x43dff8
cmp edi, eax
jne 0x43dfdf
cmp ebx, edx
je 0x43e198
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret 0x10
sub eax, edi
sbb edx, ebx
xor edi, edi
cmp edi, edx
jb 0x43e010
ja 0x43e008
cmp ecx, eax
jbe 0x43e010
mov ecx, eax
mov dword [ebp + 0x10], ecx
lea ecx, [ecx]
mov edx, dword [esi + 0x28]
mov ebx, edx
mov edi, dword [esi + 0x2c]
and ebx, 0xfffc0000
cmp dword [esi + 0x44], 0
jbe 0x43e032
cmp dword [esi + 0x38], ebx
jne 0x43e032
cmp dword [esi + 0x3c], edi
je 0x43e15b
mov eax, edx
and eax, 0x3ffff
or eax, 0
jne 0x43e07a
test dword [esp + 0x10], 0x3ffff
jne 0x43e07a
add ecx, edx
adc eax, edi
mov dword [esp + 0x20], eax
mov eax, ecx
and eax, 0x3ffff
or eax, 0
je 0x43e1b5
and ecx, 0xfffc0000
cmp dword [esp + 0x20], edi
ja 0x43e1ae
jb 0x43e07a
cmp ecx, edx
ja 0x43e1ae
cmp ebx, dword [esi + 0x30]
jne 0x43e084
cmp edi, dword [esi + 0x34]
je 0x43e0c8
mov eax, edi
mov dword [esp + 0x20], edi
sar eax, 0x1f
push 0
lea eax, [esp + 0x24]
push eax
push ebx
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x43e0b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x43e26d
mov eax, dword [esp + 0x20]
xor ecx, ecx
add ecx, dword [esp + 0x18]
mov dword [esi + 0x30], ecx
adc eax, 0
mov dword [esi + 0x34], eax
cmp byte [esi + 0x1d], 0
mov dword [esi + 0x3c], edi
mov edi, 0x40000
mov dword [esi + 0x38], ebx
je 0x43e0f8
mov edi, dword [esi + 0x20]
sub edi, dword [esi + 0x30]
mov eax, dword [esi + 0x24]
sbb eax, dword [esi + 0x34]
test eax, eax
ja 0x43e0f3
jb 0x43e0f8
cmp edi, 0x40000
jb 0x43e0f8
mov edi, 0x40000
cmp dword [esi + 0x40], 0
jne 0x43e11d
push 4
push 0x1000
push 0x40000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esi + 0x40], eax
test eax, eax
je 0x43e286
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push edi
push dword [esi + 0x40]
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x44], ecx
test eax, eax
je 0x43e26d
test ecx, ecx
je 0x43e198
add dword [esi + 0x30], ecx
mov ecx, dword [ebp + 0x10]
adc dword [esi + 0x34], 0
jmp 0x43e010
mov eax, dword [esi + 0x44]
mov ecx, edx
and ecx, 0x3ffff
cmp ecx, eax
jae 0x43e198
mov edi, dword [ebp + 0x10]
sub eax, ecx
cmp eax, edi
cmovb edi, eax
mov eax, dword [esi + 0x40]
push edi
add eax, ecx
push eax
push dword [esp + 0x18]
call fcn.004e4930
mov edx, dword [esp + 0x20]
add esp, 0xc
add dword [esi + 0x28], edi
adc dword [esi + 0x2c], 0
test edx, edx
je 0x43e198
add dword [edx], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret 0x10
sub ecx, edx
mov dword [ebp + 0x10], ecx
jmp 0x43e1b8
mov ecx, dword [ebp + 0x10]
mov eax, edi
cmp edx, dword [esi + 0x30]
jne 0x43e1c4
cmp eax, dword [esi + 0x34]
je 0x43e1f4
lea ecx, [esp + 0x18]
push ecx
push 0
push eax
push edx
lea ecx, [esi + 0x18]
call fcn.00419f60
test al, al
je 0x43e26d
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x28], ecx
mov dword [esi + 0x30], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x34], eax
mov eax, 0x400000
mov dword [esp + 0x20], 0
cmp ecx, eax
push 0
cmova ecx, eax
lea eax, [esp + 0x24]
push eax
push ecx
push dword [esp + 0x1c]
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x14]
test eax, eax
mov eax, dword [esp + 0x20]
setne cl
test edx, edx
je 0x43e22e
mov dword [edx], eax
add dword [esi + 0x28], eax
adc dword [esi + 0x2c], 0
add dword [esi + 0x30], eax
adc dword [esi + 0x34], 0
test cl, cl
jne 0x43e198
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi + 0x4c]
test ecx, ecx
je 0x43e29f
mov edx, dword [ecx]
push eax
push dword [esi + 0x50]
call dword [edx]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret 0x10
call fcn.0043de00
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret 0x10
test eax, eax
je 0x43dfdf
jle 0x43e2b1
movzx eax, ax
or eax, 0x80070000
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004df96c
mov esp, ebp
pop ebp
ret 0x10