Function at 0x45b740
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xd8
movsx eax, byte [esp + 0xe0]
push ebx
push ebp
mov dword [esp + 0x3c], ecx
push esi
mov ecx, dword [esp + 0xe8]
push edi
push 0x4879dc
push ecx
mov dword [esp + 0x30], eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x45b787
pop edi
pop esi
pop ebp
mov ax, 0x427
pop ebx
add esp, 0xd8
ret 8
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push edi
push 1
lea edx, [esp + 0x40]
push 4
push edx
call esi
add esp, 0x10
test eax, eax
je 0x45bb10
movsx eax, word [esp + 0x38]
sub eax, 0x93
je 0x45b7eb
sub eax, 0x2f
jne 0x45bb10
mov ebp, 0x12
push edi
push 1
lea eax, [esp + 0x68]
push ebp
push eax
mov dword [esp + 0x40], 2
mov ebx, 0x30
call esi
add esp, 0x10
test eax, eax
je 0x45bb10
mov eax, dword [esp + 0x6e]
mov ecx, dword [esp + 0x6c]
jmp 0x45b81b
mov ebp, 0x10
push edi
push 1
lea eax, [esp + 0x54]
push ebp
push eax
mov dword [esp + 0x40], 0
mov ebx, 0x28
call esi
add esp, 0x10
test eax, eax
je 0x45bb10
mov eax, dword [esp + 0x5a]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x3a]
mov dword [esp + 0x10], ecx
test al, 0x30
mov dword [esp + 0x14], edx
jne 0x45bb10
test al, 2
je 0x45bb10
test cx, cx
je 0x45b861
push edi
push 1
lea eax, [esp + 0xd4]
push 0x1c
push eax
call esi
add esp, 0x10
test eax, eax
je 0x45bb10
mov ecx, dword [esp + 0xdc]
mov dword [esp + 0x20], ecx
movsx eax, word [esp + 0x14]
mov dword [esp + 0x2c], eax
lea edx, [eax*4]
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x28], eax
xor eax, eax
add esp, 4
cmp ecx, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], eax
jle 0x45b9d3
movsx ecx, word [esp + 0x10]
movsx eax, bp
movsx ebx, bx
lea edx, [eax + ecx + 4]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x10], edx
jmp 0x45b8b7
mov esi, dword [sym.imp.MSVCRT.dll_fread]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
push 0
push eax
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x45bb10
cmp word [esp + 0x30], ax
push edi
push 1
push ebx
je 0x45b90e
lea ecx, [esp + 0xa8]
push ecx
call esi
add esp, 0x10
test eax, eax
je 0x45bb10
mov eax, dword [esp + 0xb0]
mov ebx, dword [esp + 0xc4]
mov esi, dword [esp + 0xac]
mov ebp, dword [esp + 0xa4]
jmp 0x45b93c
lea edx, [esp + 0x80]
push edx
call esi
add esp, 0x10
test eax, eax
je 0x45bb10
mov eax, dword [esp + 0x88]
mov ebx, dword [esp + 0x98]
mov esi, dword [esp + 0x84]
mov ebp, dword [esp + 0x7c]
push 0
push eax
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x45bb10
test bl, 0x80
jne 0x45b9b0
test esi, esi
je 0x45b9b0
lea eax, [esi*4 + 8]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
add esp, 4
mov dword [ecx + edx*4], eax
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
cmp dword [ecx + eax*4], 0
je 0x45ba0c
inc eax
push edi
mov dword [esp + 0x20], eax
push esi
mov eax, dword [ecx + eax*4 - 4]
push 4
mov dword [eax], ebp
add eax, 4
mov dword [eax], esi
add eax, 4
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp esi, eax
jne 0x45ba57
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add edx, ecx
mov ecx, dword [esp + 0x2c]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
jl 0x45b8ad
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x48]
add esp, 4
movsx edx, word [eax + 0x1b8]
mov eax, dword [eax + 0x1bc]
mov dword [esp + 0x18], edx
cmp eax, 0xffffffff
jne 0x45baa2
pop edi
pop esi
pop ebp
mov ax, 0x40f
pop ebx
add esp, 0xd8
ret 8
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x20]
add esp, 4
xor esi, esi
test eax, eax
je 0x45ba39
mov edx, dword [esp + 0x24]
mov eax, dword [edx + esi*4]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x20]
add esp, 4
inc esi
cmp esi, eax
jne 0x45ba20
mov ecx, dword [esp + 0x24]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ax, 0x3f4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret 8
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x20]
add esp, 4
xor esi, esi
test eax, eax
je 0x45ba84
mov edx, dword [esp + 0x24]
mov eax, dword [edx + esi*4]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x20]
add esp, 4
inc esi
cmp esi, eax
jne 0x45ba6b
mov ecx, dword [esp + 0x24]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ax, 0x404
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret 8
lea ecx, [esp + 0x48]
push 0
push ecx
lea edx, [esp + 0x48]
push 4
push edx
lea ecx, [esp + 0x28]
push 0x14
push ecx
push 0x9c40a62c
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
mov eax, dword [esp + 0x1c]
xor esi, esi
test eax, eax
je 0x45bae8
mov edx, dword [esp + 0x24]
mov eax, dword [edx + esi*4]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x20]
add esp, 4
inc esi
cmp esi, eax
jne 0x45bacf
mov ecx, dword [esp + 0x24]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x44]
add esp, 4
cmp edi, 1
je 0x45bb1e
pop edi
pop esi
pop ebp
mov eax, 0x43c
pop ebx
add esp, 0xd8
ret 8
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov ax, 0x428
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret 8