Function at 0x40b3a8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1002c
call fcn.00421370
mov eax, dword [0x42a050]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push edi
mov ebx, ecx
push ebx
push 0x405370
push 1
mov dword [ebp - 0x10028], eax
mov dword [ebp - 0x1001c], ebx
call fcn.00408be5
xor edi, edi
mov eax, fcn.0040682c
add esp, 0xc
mov dword [ebp - 0x10014], edi
mov dword [ebp - 0x10018], edi
test eax, eax
je 0x40b412
push edi
push dword [esi + 0x24]
push dword [esi + 0x20]
push ebx
push 6
call fcn.0040682c
mov ebx, eax
cmp ebx, edi
jne 0x40b606
mov edx, dword [ebp - 0x1001c]
lea eax, [ebp - 0x10014]
push eax
call fcn.00409df9
mov ebx, eax
cmp ebx, edi
jl 0x40b5f3
push edi
push dword [ebp - 0x10014]
call fcn.004098c3
mov ebx, eax
cmp ebx, edi
jl 0x40b5f3
push 0x8000080
push 2
push 5
push 0x40000000
push dword [ebp - 0x1001c]
call fcn.0040a27f
mov dword [ebp - 0x10010], eax
cmp eax, 0xffffffff
jne 0x40b492
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, edi
jle 0x40b482
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x40b5f3
mov ebx, 0x80004005
jmp 0x40b5f3
push dword [esi + 0x24]
push dword [esi + 0x20]
push eax
call fcn.0040a14c
mov ebx, eax
cmp ebx, edi
jl 0x40b5e7
push dword [ebp - 0x10010]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x40b618
push edi
push edi
push edi
push dword [ebp - 0x10010]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40b618
mov ecx, dword [ebp - 0x10028]
mov eax, dword [ecx + 0x10]
mov edx, dword [eax + 8]
add edx, dword [esi + 0x18]
mov eax, dword [eax + 0xc]
adc eax, dword [esi + 0x1c]
push eax
push edx
push dword [ecx]
call fcn.0040a14c
mov ebx, eax
cmp ebx, edi
jl 0x40b5e7
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
xor edx, edx
sub ecx, dword [ebp - 0x10018]
sbb eax, edx
cmp eax, edi
jb 0x40b51f
ja 0x40b51a
cmp ecx, 0x10000
jbe 0x40b51f
mov ecx, 0x10000
push edi
lea eax, [ebp - 0x10024]
push eax
push ecx
lea eax, [ebp - 0x1000c]
push eax
mov eax, dword [ebp - 0x10028]
push dword [eax]
mov dword [ebp - 0x10024], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b618
push dword [ebp - 0x10024]
lea eax, [ebp - 0x1000c]
push eax
push dword [ebp - 0x10010]
lea ebx, [ebp - 0x10020]
mov dword [ebp - 0x10020], edi
call fcn.0040a190
mov ebx, eax
cmp ebx, edi
jl 0x40b5e7
mov eax, dword [ebp - 0x10018]
add eax, dword [ebp - 0x10020]
mov ecx, fcn.0040682c
mov dword [ebp - 0x10018], eax
test ecx, ecx
je 0x40b5ac
push edi
push edi
push eax
push dword [ebp - 0x1001c]
push 7
call fcn.0040682c
mov ebx, eax
cmp ebx, edi
jne 0x40b5e7
mov eax, dword [ebp - 0x10018]
cmp edi, dword [esi + 0x24]
ja 0x40b5c0
jb 0x40b4fc
cmp eax, dword [esi + 0x20]
jb 0x40b4fc
mov eax, fcn.0040682c
test eax, eax
je 0x40b5e7
mov dword [0x42c16c], edi
call fcn.00406d2f
mov ebx, eax
cmp ebx, edi
jge 0x40b5e7
push 0x403c74
push ebx
call fcn.00408c66
pop ecx
pop ecx
push dword [ebp - 0x10010]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10014], edi
je 0x40b606
push dword [ebp - 0x10014]
call fcn.0040956f
mov ecx, dword [ebp - 8]
pop edi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.004195c9
leave
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, edi
jle 0x40b632
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x40b5e7
mov ebx, 0x80004005
jmp 0x40b5e7