Function at 0x450790
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xc
mov al, byte [esp + 0x1c]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
or edx, 0xffffffff
mov bl, al
push 1
and al, 1
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x18]
push edx
mov byte [esp + 0x34], al
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [edi]
and bl, 2
push eax
mov byte [esp + 0x27], bl
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov eax, dword [esp + 0x28]
xor esi, esi
xor ebp, ebp
cmp eax, 0x4b0
push esi
mov dword [esp + 0x2c], esi
jne 0x45090b
mov eax, dword [edi]
lea ecx, [esp + 0x2c]
push ecx
push 2
lea edx, [esp + 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4508ab
cmp dword [esp + 0x28], 2
jb 0x4508ab
mov cx, word [esp + 0x20]
movzx eax, ch
movzx ecx, cl
shl eax, 8
or eax, ecx
cmp eax, 0xa
je 0x45089f
cmp eax, 0xd
je 0x45082e
add esi, 2
jmp 0x450876
mov ecx, dword [edi]
push 0
lea edx, [esp + 0x2c]
push edx
push 2
lea eax, [esp + 0x2c]
push eax
push ecx
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4508ab
cmp dword [esp + 0x28], 2
jb 0x4508ab
mov ax, word [esp + 0x20]
movzx edx, ah
movzx eax, al
shl edx, 8
or edx, eax
cmp edx, 0xa
je 0x4508a6
test bl, bl
jne 0x4508ab
add esi, 4
xor ebp, ebp
mov eax, dword [edi]
push 0
lea ecx, [esp + 0x2c]
push ecx
push 2
lea edx, [esp + 0x2c]
push edx
push eax
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x450804
jmp 0x4508ab
mov ebp, 2
jmp 0x4508ab
mov ebp, 4
mov ecx, dword [esp + 0x14]
mov al, byte [esp + 0x2c]
add ecx, esi
test al, al
mov dword [esp + 0x20], ecx
je 0x450b5d
mov ebx, dword [esp + 0x24]
mov edx, dword [ebx]
lea eax, [esi + 9]
push edx
call fcn.00445f60
add esp, 4
test eax, eax
mov dword [ebx], eax
je 0x4508de
mov byte [eax + esi + 8], 0
mov eax, dword [ebx]
or ecx, 0xffffffff
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
push 0
cdq
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x18]
push ecx
push edx
mov edx, dword [edi]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x450b3e
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [edi]
cmp eax, 0x4b1
lea eax, [esp + 0x2c]
push eax
jne 0x450a58
push 2
lea ecx, [esp + 0x2c]
push ecx
push edx
call ebx
test eax, eax
je 0x4509d9
cmp dword [esp + 0x28], 2
jb 0x4509d9
mov ax, word [esp + 0x20]
xor ecx, ecx
mov ch, al
movzx edx, ah
or ecx, edx
mov eax, ecx
cmp eax, 0xa
je 0x4509cd
cmp eax, 0xd
je 0x45095f
add esi, 2
jmp 0x4509a8
mov edx, dword [edi]
push 0
lea eax, [esp + 0x2c]
push eax
mov ebp, 2
push ebp
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x3c], 0
call ebx
test eax, eax
je 0x4509d9
cmp dword [esp + 0x28], ebp
jb 0x4509d9
mov ax, word [esp + 0x20]
xor ecx, ecx
mov ch, al
movzx edx, ah
or ecx, edx
cmp ecx, 0xa
je 0x4509d4
mov al, byte [esp + 0x13]
test al, al
jne 0x4509d9
add esi, 4
xor ebp, ebp
mov edx, dword [edi]
push 0
lea eax, [esp + 0x2c]
push eax
push 2
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x3c], 0
call ebx
test eax, eax
jne 0x450935
jmp 0x4509d9
mov ebp, 2
jmp 0x4509d9
mov ebp, 4
mov eax, dword [esp + 0x14]
add eax, esi
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x2c]
test al, al
je 0x450a4d
mov ebx, dword [esp + 0x24]
mov ecx, dword [ebx]
lea eax, [esi + 9]
push ecx
call fcn.00445f60
add esp, 4
test eax, eax
mov dword [ebx], eax
je 0x450a08
mov byte [eax + esi + 8], 0
mov edx, dword [ebx]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2c], edx
cdq
push 0
push edx
push eax
mov eax, dword [edi]
push eax
call fcn.004403b0
mov edx, dword [esp + 0x3c]
mov eax, dword [edi]
add esp, 0x10
push 0
lea ecx, [esp + 0x30]
push ecx
push esi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebx]
push esi
push ecx
call fcn.004431b0
mov edx, dword [ebx]
add esp, 8
mov dword [esi + edx], 0
mov eax, dword [esp + 0x20]
add eax, ebp
jmp 0x450b64
push 1
lea ecx, [esp + 0x2c]
push ecx
push edx
mov byte [esp + 0x34], 0
call ebx
test eax, eax
je 0x450af9
nop
cmp dword [esp + 0x28], 1
jb 0x450af9
mov al, byte [esp + 0x20]
cmp al, 0xa
je 0x450aed
cmp al, 0xd
je 0x450a8a
inc esi
jmp 0x450ac7
mov edx, dword [edi]
push 0
lea eax, [esp + 0x2c]
push eax
mov ebp, 1
push ebp
lea ecx, [esp + 0x2c]
push ecx
push edx
mov dword [esp + 0x3c], 0
call ebx
test eax, eax
je 0x450af9
cmp dword [esp + 0x28], ebp
jb 0x450af9
cmp byte [esp + 0x20], 0xa
je 0x450af4
mov al, byte [esp + 0x13]
test al, al
jne 0x450af9
add esi, 2
xor ebp, ebp
mov edx, dword [edi]
push 0
lea eax, [esp + 0x2c]
push eax
push 1
lea ecx, [esp + 0x2c]
push ecx
push edx
mov byte [esp + 0x34], 0
mov dword [esp + 0x3c], 0
call ebx
test eax, eax
jne 0x450a70
jmp 0x450af9
mov ebp, 1
jmp 0x450af9
mov ebp, 2
mov eax, dword [esp + 0x14]
add eax, esi
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x2c]
test al, al
je 0x450b5d
mov ebx, dword [esp + 0x24]
mov ecx, dword [ebx]
lea eax, [esi + 9]
push ecx
call fcn.00445f60
add esp, 4
test eax, eax
mov dword [ebx], eax
je 0x450b28
mov byte [eax + esi + 8], 0
mov edx, dword [ebx]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x2c], edx
cdq
push 0
push edx
push eax
mov ecx, edi
call fcn.00445e00
mov ecx, dword [esp + 0x2c]
mov edx, dword [edi]
push 0
lea eax, [esp + 0x30]
push eax
push esi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebx]
mov dword [esi + eax], 0
mov ecx, dword [esp + 0x20]
lea eax, [ecx + ebp]
or ecx, 0xffffffff
push 0
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
cdq
lea ecx, [esp + 0x18]
push ecx
push edx
mov edx, dword [edi]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
add esi, ebp
pop edi
xor eax, eax
test esi, esi
pop esi
pop ebp
setg al
pop ebx
add esp, 0xc
ret