Function at 0x10057e30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.10093340
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1018], 0
mov dword [ebp - 0x1014], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
je 0x10057e6a
jmp 0x10057e8b
push str.f___NULL
push 0x100f2200
push 0x201
push 0x100f2204
push 0x100f2220
call sym.glib_2.0.dll_g_assertion_message_expr
add esp, 0x14
xor eax, eax
jne 0x10057e62
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_feof]
add esp, 4
test eax, eax
jne 0x10058047
mov edx, dword [ebp + 0xc]
push edx
push 0x1000
push 1
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x10
mov dword [ebp - 0xc], eax
call dword [sym.imp.MSVCR90.dll__errno]
mov ecx, dword [eax]
mov dword [ebp - 0x101c], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1014]
lea ecx, [eax + edx + 1]
cmp ecx, dword [ebp - 4]
jbe 0x10057f80
cmp dword [ebp - 0x1018], 0
je 0x10057ef9
mov edx, dword [ebp - 4]
shl edx, 1
mov dword [ebp - 4], edx
jmp 0x10057f27
mov eax, dword [ebp - 0xc]
add eax, 1
cmp eax, 0x1000
jae 0x10057f14
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0x1020], ecx
jmp 0x10057f1e
mov dword [ebp - 0x1020], 0x1000
mov edx, dword [ebp - 0x1020]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x1018]
push ecx
call sym.glib_2.0.dll_g_try_realloc
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x10057f72
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 4]
push eax
push str.Could_not_allocate__lu_bytes_to_read_file___s_
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
push 0xd
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov ecx, dword [ebp + 0x18]
push ecx
call sym.glib_2.0.dll_g_set_error
add esp, 0x18
jmp 0x100580a6
mov edx, dword [ebp - 8]
mov dword [ebp - 0x1018], edx
jmp 0x10057ed0
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_ferror]
add esp, 4
test eax, eax
je 0x10057fda
mov ecx, dword [ebp - 0x101c]
push ecx
call sym.glib_2.0.dll_g_strerror
add esp, 4
push eax
mov edx, dword [ebp + 8]
push edx
push str.Error_reading_file__s:__s
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
mov eax, dword [ebp - 0x101c]
push eax
call sym.glib_2.0.dll_g_file_error_from_errno
add esp, 4
push eax
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov ecx, dword [ebp + 0x18]
push ecx
call sym.glib_2.0.dll_g_set_error
add esp, 0x18
jmp 0x100580a6
mov edx, dword [ebp - 0xc]
push edx
lea eax, [ebp - 0x1010]
push eax
mov ecx, dword [ebp - 0x1018]
add ecx, dword [ebp - 0x1014]
push ecx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x1014]
add edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x1014]
jae 0x10058033
mov eax, dword [ebp + 8]
push eax
push str.File___s__is_too_large
call sym.glib_2.0.dll_glib_gettext
add esp, 4
push eax
push 0x18
call sym.glib_2.0.dll_g_file_error_quark
push eax
mov ecx, dword [ebp + 0x18]
push ecx
call sym.glib_2.0.dll_g_set_error
add esp, 0x14
jmp 0x100580a6
mov edx, dword [ebp - 0x1014]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x1014], edx
jmp 0x10057e8f
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
cmp dword [ebp - 4], 0
jne 0x10058074
push 1
call sym.glib_2.0.dll_g_malloc
add esp, 4
mov dword [ebp - 0x1018], eax
mov dword [ebp - 0x1014], 0
mov ecx, dword [ebp - 0x1018]
add ecx, dword [ebp - 0x1014]
mov byte [ecx], 0
cmp dword [ebp + 0x14], 0
je 0x10058094
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x1014]
mov dword [edx], eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x1018]
mov dword [ecx], edx
mov eax, 1
jmp 0x100580c4
mov eax, dword [ebp - 0x1018]
push eax
call sym.glib_2.0.dll_g_free
add esp, 4
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10001000
mov esp, ebp
pop ebp
ret