Function at 0x40b2b3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
cmp dword [eax], 0xffffffff
jne 0x40b2cf
xor eax, eax
jmp 0x40b523
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x34]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
sub eax, 2
cmp eax, 1
sbb eax, eax
neg eax
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 8]
dec ecx
cmp ecx, 1
sbb ecx, ecx
neg ecx
or eax, ecx
je 0x40b499
mov dword [ebp - 0x10], 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov eax, dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x40
lea eax, [ebp - 0x50]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 4]
xor dword [ecx + 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - 4]
xor dword [ecx + 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
add eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 0xc]
jbe 0x40b38f
xor eax, eax
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 4]
add ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
sub ecx, dword [edx + 0xc]
sub eax, ecx
neg eax
sub dword [ebp + 0x10], eax
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp dword [ebp + 0x18], 0
je 0x40b3b9
mov eax, dword [ebp + 0x18]
add dword [eax + 8], 0x40
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x40b3f0
mov eax, 1
jmp 0x40b523
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 8]
cmp dword [eax + 4], ecx
jae 0x40b441
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x14]
add eax, dword [ecx]
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx + 8]
jb 0x40b43c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov ecx, dword [ebp + 8]
sub eax, dword [ecx + 4]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov ecx, dword [ebp + 0x14]
add eax, dword [ecx]
mov ecx, dword [ebp - 4]
sub eax, dword [ecx + 8]
mov dword [ebp - 0xc], eax
jmp 0x40b450
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40b494
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
dec dword [ebp - 0xc]
jmp 0x40b46b
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
jl 0x40b494
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x54]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x40d850]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x54]
mov byte [ecx + edx], al
jmp 0x40b468
jmp 0x40b519
cmp dword [ebp + 0x18], 0
je 0x40b4aa
mov eax, dword [ebp + 0x18]
add dword [eax + 8], 0x40
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x40b519
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], 0
jmp 0x40b4ec
inc dword [ebp - 0x58]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x58]
cmp dword [eax], ecx
jbe 0x40b519
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x40d850]
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x5c]
mov byte [ecx + edx], al
jmp 0x40b4e9
mov eax, 1
jmp 0x40b523
pop edi
pop esi
pop ebx
leave
ret