Function at 0x685db6d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1068
call fcn.68651aa0
mov eax, dword [ebp - 0x10]
test edx, edx
mov dword [ebp - 0x101c], edx
mov dword [ebp - 0x1038], ecx
mov dword [ebp - 0x102c], eax
je 0x685db972
test byte [edx + 0xc], 0x10
jne 0x685db9a2
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0x1028], esi
xor edx, edx
mov ecx, dword [ebp - 0x101c]
mov eax, 1
lea esi, [ebp - 0x1018]
mov dword [ebp - 0x103c], edx
mov dword [esp], esi
mov dword [esp + 0xc], ecx
mov ecx, 0x1000
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call sym._fread
mov edi, eax
call sym.__errno
mov edx, dword [ebp - 0x103c]
lea ecx, [edi + 1]
mov eax, dword [eax]
mov dword [ebp - 0x1030], edi
mov dword [ebp - 0x1020], ecx
mov dword [ebp - 0x1034], eax
mov eax, dword [ebp - 0x1028]
add eax, edi
mov esi, eax
inc esi
mov edi, esi
mov esi, edx
mov dword [ebp - 0x1024], eax
jmp 0x685db794
add ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_try_realloc
test eax, eax
je 0x685db7d0
mov esi, eax
cmp ebx, edi
jae 0x685db840
test esi, esi
nop
jne 0x685db780
mov ebx, dword [ebp - 0x1020]
cmp ebx, 0x1000
jbe 0x685db782
mov ebx, 0x1000
mov dword [esp + 4], ebx
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_try_realloc
test eax, eax
jne 0x685db792
lea esi, [esi]
lea edi, [edi]
mov dword [ebp - 0x103c], esi
mov dword [esp], str.Could_not_allocate__lu_bytes_to_read_file___s_
call sym.libglib_2.0_0.dll_glib_gettext
mov esi, eax
call sym.libglib_2.0_0.dll_g_file_error_quark
mov edi, dword [ebp - 0x102c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 0x14], edi
mov edi, 0xd
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym.libglib_2.0_0.dll_g_set_error
mov edx, dword [ebp - 0x103c]
mov dword [esp], edx
call sym.libglib_2.0_0.dll_g_free
mov edi, dword [ebp - 0x101c]
mov dword [esp], edi
call sym._fclose
xor eax, eax
add esp, 0x106c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x101c]
mov edx, esi
mov edi, dword [ebp - 0x1030]
test byte [ecx + 0xc], 0x20
jne 0x685dbae0
mov eax, dword [ebp - 0x1028]
add eax, esi
cmp edi, 8
mov dword [ebp - 0x1020], eax
lea esi, [ebp - 0x1018]
mov eax, edi
mov ecx, dword [ebp - 0x1020]
mov dword [ebp - 0x1034], esi
mov dword [ebp - 0x1030], ecx
jae 0x685db921
xor ecx, ecx
test al, 4
jne 0x685db902
test al, 2
jne 0x685db8e5
test al, 1
jne 0x685db8d0
mov eax, dword [ebp - 0x1028]
cmp dword [ebp - 0x1024], eax
jb 0x685dba6b
mov edi, dword [ebp - 0x101c]
test byte [edi + 0xc], 0x10
jne 0x685dbab5
mov eax, dword [ebp - 0x1024]
mov dword [ebp - 0x1028], eax
jmp 0x685db714
mov esi, dword [ebp - 0x1034]
mov edi, dword [ebp - 0x1030]
movzx eax, byte [esi + ecx]
mov byte [edi + ecx], al
jmp 0x685db897
mov esi, dword [ebp - 0x1034]
mov edi, dword [ebp - 0x1030]
movzx esi, word [esi + ecx]
mov word [edi + ecx], si
add ecx, 2
test al, 1
je 0x685db897
jmp 0x685db8d0
mov esi, dword [ebp - 0x1034]
test al, 2
mov edi, dword [ebp - 0x1030]
mov ecx, dword [esi]
mov dword [edi], ecx
mov ecx, 4
je 0x685db893
jmp 0x685db8e5
test cl, 1
jne 0x685dba44
test byte [ebp - 0x1030], 2
jne 0x685dba18
test byte [ebp - 0x1030], 4
jne 0x685db9ee
mov ecx, eax
mov edi, dword [ebp - 0x1030]
and eax, 3
shr ecx, 2
mov esi, dword [ebp - 0x1034]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
test al, 4
mov dword [ebp - 0x1034], esi
mov dword [ebp - 0x1030], edi
je 0x685db88f
jmp 0x685db902
mov edi, str.f___NULL
mov esi, str.get_contents_stdio
mov ebx, 0x201
mov ecx, str.gfileutils.c
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], 0x6865c605
call sym.libglib_2.0_0.dll_g_assertion_message_expr
mov eax, dword [ebp - 0x101c]
mov dword [esp], eax
call sym._fclose
mov dword [esp], 1
xor ebx, ebx
call sym.libglib_2.0_0.dll_g_malloc
mov dword [ebp - 0x1024], ebx
mov edx, eax
mov eax, dword [ebp - 0x1024]
mov byte [edx + eax], 0
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x685db9dc
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov esi, dword [ebp - 0x1038]
mov eax, 1
mov dword [esi], edx
jmp 0x685db831
mov esi, dword [ebp - 0x1034]
sub eax, 4
mov edi, dword [ebp - 0x1030]
mov ecx, dword [esi]
add esi, 4
mov dword [edi], ecx
add edi, 4
mov dword [ebp - 0x1030], edi
mov dword [ebp - 0x1034], esi
jmp 0x685db944
mov esi, dword [ebp - 0x1034]
sub eax, 2
mov edi, dword [ebp - 0x1030]
movzx ecx, word [esi]
add esi, 2
mov word [edi], cx
add edi, 2
mov dword [ebp - 0x1030], edi
mov dword [ebp - 0x1034], esi
jmp 0x685db937
movzx ecx, byte [ebp - 0x1018]
lea edi, [ebp - 0x1017]
dec eax
mov esi, dword [ebp - 0x1020]
mov byte [esi], cl
inc dword [ebp - 0x1030]
mov dword [ebp - 0x1034], edi
jmp 0x685db92a
mov dword [ebp - 0x103c], edx
mov esi, 0x18
mov dword [esp], str.File___s__is_too_large
call sym.libglib_2.0_0.dll_glib_gettext
mov ebx, eax
call sym.libglib_2.0_0.dll_g_file_error_quark
mov ecx, dword [ebp - 0x102c]
mov dword [esp + 8], esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ecx
mov dword [esp], esi
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_set_error
mov edx, dword [ebp - 0x103c]
jmp 0x685db819
mov dword [ebp - 0x103c], edx
mov dword [esp], edi
call sym._fclose
test ebx, ebx
mov edx, dword [ebp - 0x103c]
jne 0x685db9c6
jmp 0x685db9b0
mov esi, dword [ebp - 0x1034]
mov ebx, 0x18
mov dword [ebp - 0x103c], edx
mov dword [esp], esi
call sym.libglib_2.0_0.dll_g_strerror
mov dword [esp], str.Error_reading_file__s:__s
mov esi, eax
call sym.libglib_2.0_0.dll_glib_gettext
mov edx, dword [ebp - 0x103c]
mov edi, eax
mov eax, dword [ebp - 0x1034]
dec eax
cmp eax, 0x27
ja 0x685dbb22
mov ebx, dword [eax*4 + 0x6865c9c0]
mov dword [ebp - 0x103c], edx
call sym.libglib_2.0_0.dll_g_file_error_quark
mov ecx, dword [ebp - 0x102c]
mov dword [esp + 0x14], esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 0x10], ecx
mov dword [esp], esi
mov dword [esp + 4], eax
call sym.libglib_2.0_0.dll_g_set_error
mov edx, dword [ebp - 0x103c]
jmp 0x685db819