Function at 0x40d0e3
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 0x40d0ff
xor eax, eax
jmp 0x40d353
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 0x40d2c9
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 0x40d1bf
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 0x40d1e9
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 0x40d220
mov eax, 1
jmp 0x40d353
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 4]
cmp dword [eax + 8], ecx
jbe 0x40d271
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 0x40d26c
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 0x40d280
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 0x40d2c4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x54], eax
dec dword [ebp - 0xc]
jmp 0x40d29b
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0
jl 0x40d2c4
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x54]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x415308]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x54]
mov byte [ecx + edx], al
jmp 0x40d298
jmp 0x40d349
cmp dword [ebp + 0x18], 0
je 0x40d2da
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 0x40d349
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], 0
jmp 0x40d31c
inc dword [ebp - 0x58]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x58]
cmp dword [eax], ecx
jbe 0x40d349
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
xor edx, edx
mov dl, byte [eax + ecx]
mov al, byte [edx + 0x415308]
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x5c]
mov byte [ecx + edx], al
jmp 0x40d319
mov eax, 1
jmp 0x40d353
pop edi
pop esi
pop ebx
leave
ret