Function at 0x451780
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 0x4518fb
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 0x45189b
cmp dword [esp + 0x28], 2
jb 0x45189b
mov cx, word [esp + 0x20]
movzx eax, ch
movzx ecx, cl
shl eax, 8
or eax, ecx
cmp eax, 0xa
je 0x45188f
cmp eax, 0xd
je 0x45181e
add esi, 2
jmp 0x451866
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 0x45189b
cmp dword [esp + 0x28], 2
jb 0x45189b
mov ax, word [esp + 0x20]
movzx edx, ah
movzx eax, al
shl edx, 8
or edx, eax
cmp edx, 0xa
je 0x451896
test bl, bl
jne 0x45189b
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 0x4517f4
jmp 0x45189b
mov ebp, 2
jmp 0x45189b
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 0x451b4d
mov ebx, dword [esp + 0x24]
mov edx, dword [ebx]
lea eax, [esi + 9]
push edx
call fcn.00449190
add esp, 4
test eax, eax
mov dword [ebx], eax
je 0x4518ce
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 0x451b2e
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [edi]
cmp eax, 0x4b1
lea eax, [esp + 0x2c]
push eax
jne 0x451a48
push 2
lea ecx, [esp + 0x2c]
push ecx
push edx
call ebx
test eax, eax
je 0x4519c9
cmp dword [esp + 0x28], 2
jb 0x4519c9
mov ax, word [esp + 0x20]
xor ecx, ecx
mov ch, al
movzx edx, ah
or ecx, edx
mov eax, ecx
cmp eax, 0xa
je 0x4519bd
cmp eax, 0xd
je 0x45194f
add esi, 2
jmp 0x451998
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 0x4519c9
cmp dword [esp + 0x28], ebp
jb 0x4519c9
mov ax, word [esp + 0x20]
xor ecx, ecx
mov ch, al
movzx edx, ah
or ecx, edx
cmp ecx, 0xa
je 0x4519c4
mov al, byte [esp + 0x13]
test al, al
jne 0x4519c9
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 0x451925
jmp 0x4519c9
mov ebp, 2
jmp 0x4519c9
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 0x451a3d
mov ebx, dword [esp + 0x24]
mov ecx, dword [ebx]
lea eax, [esi + 9]
push ecx
call fcn.00449190
add esp, 4
test eax, eax
mov dword [ebx], eax
je 0x4519f8
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.00444930
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.00447900
mov edx, dword [ebx]
add esp, 8
mov dword [esi + edx], 0
mov eax, dword [esp + 0x20]
add eax, ebp
jmp 0x451b54
push 1
lea ecx, [esp + 0x2c]
push ecx
push edx
mov byte [esp + 0x34], 0
call ebx
test eax, eax
je 0x451ae9
nop
cmp dword [esp + 0x28], 1
jb 0x451ae9
mov al, byte [esp + 0x20]
cmp al, 0xa
je 0x451add
cmp al, 0xd
je 0x451a7a
inc esi
jmp 0x451ab7
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 0x451ae9
cmp dword [esp + 0x28], ebp
jb 0x451ae9
cmp byte [esp + 0x20], 0xa
je 0x451ae4
mov al, byte [esp + 0x13]
test al, al
jne 0x451ae9
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 0x451a60
jmp 0x451ae9
mov ebp, 1
jmp 0x451ae9
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 0x451b4d
mov ebx, dword [esp + 0x24]
mov ecx, dword [ebx]
lea eax, [esi + 9]
push ecx
call fcn.00449190
add esp, 4
test eax, eax
mov dword [ebx], eax
je 0x451b18
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.00449070
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