Function at 0x458020
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push 0x40
call esi
mov ebx, eax
add esp, 4
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x458047
pop esi
lea eax, [ebx + 0x66]
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 0x40
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
lea eax, [ebx + 0x1c]
push eax
call fcn.00457f70
lea eax, [ebx + 0xc]
push eax
call fcn.00457f70
add esp, 0x14
mov dword [ebp - 4], 0
cmp dword [ebp + 0x10], 0
je 0x458137
push 0x516b70
push dword [ebp + 0xc]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
mov eax, dword [ebp - 4]
add esp, 0xc
test eax, eax
jne 0x4580a0
mov dword [ebp - 4], 0x65
jmp 0x45815c
push 2
push 0
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x4580d5
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebp - 4], 0xc
jmp 0x45815c
lea eax, [edi + 1]
push eax
call esi
add esp, 4
mov dword [ebx], eax
test eax, eax
jne 0x4580f2
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
jmp 0x458155
push 0
push 0
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [ebp - 4]
push edi
push 1
push dword [ebx]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ecx, dword [ebx]
mov byte [eax + ecx], 0
push dword [ebp - 4]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x20
mov eax, dword [ebx]
push ebx
push dword [ebp + 8]
mov dword [ebx + 4], eax
call fcn.00458fd0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x458145
push 0x5137ab
jmp 0x458146
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
add esp, 4
mov dword [ebx], eax
test eax, eax
jne 0x45811f
mov dword [ebp - 4], 0x66
mov eax, dword [ebx]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test eax, eax
je 0x45816e
push eax
call edi
add esp, 4
lea eax, [ebx + 0x1c]
push eax
call fcn.00457f30
lea eax, [ebx + 0xc]
push eax
call fcn.00457f30
mov ebx, dword [ebx + 0x30]
add esp, 8
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x45820f
mov eax, dword [ebx]
test eax, eax
je 0x4581a3
push eax
call edi
add esp, 4
mov dword [ebx], 0
mov eax, dword [ebx + 8]
test eax, eax
je 0x4581b7
push eax
call edi
add esp, 4
mov dword [ebx + 8], 0
mov eax, dword [ebx + 4]
test eax, eax
je 0x4581cb
push eax
call edi
add esp, 4
mov dword [ebx + 4], 0
mov esi, dword [ebx + 0xc]
test esi, esi
je 0x4581fd
mov eax, dword [esi]
mov ebx, dword [esi + 8]
test eax, eax
je 0x4581e1
push eax
call edi
add esp, 4
mov eax, dword [esi + 4]
test eax, eax
je 0x4581ee
push eax
call edi
add esp, 4
push esi
call edi
add esp, 4
mov esi, ebx
test ebx, ebx
jne 0x4581d2
mov ebx, dword [ebp - 8]
mov esi, dword [ebx + 0x10]
push ebx
call edi
add esp, 4
mov dword [ebp - 8], esi
mov ebx, esi
test esi, esi
jne 0x458191
push dword [ebp - 0xc]
call edi
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret