Function at 0x415aa0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x7fb8
call fcn.005865a0
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0x7fb4], eax
mov eax, dword [esp + 0x7fc8]
push ebx
mov ebx, dword [esp + 0x7fc8]
push ebp
mov ebp, dword [esp + 0x7fc8]
push esi
mov esi, dword [esp + 0x7fc8]
push edi
push ebp
push esi
push str.GTFILEREF_TA_ld_FILEREF_s__n
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 1
call fcn.00575440
add esp, 0xc
test esi, esi
jl 0x415b41
push 0
lea edi, [esp + 0x1c]
mov ecx, esi
call fcn.00415210
mov esi, eax
add esp, 4
test esi, esi
jne 0x415d15
mov ecx, dword [0x6d4a74]
cmp dword [ecx + 3], 4
je 0x415b41
lea esi, [eax + 2]
push 0x2efe
push esi
call fcn.00406f10
add esp, 8
mov eax, esi
jmp 0x415d1b
push 0x5a8528
push ebp
call dword [sym.imp.MSVCR90.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x415b74
push 0x5a8528
push ebp
mov esi, 0x23ca
push 0x2efe
push esi
call fcn.00406f10
add esp, 0x10
jmp 0x415cf5
mov esi, dword [sym.imp.MSVCR90.dll_fseek]
push 2
push 0
push edi
call esi
push edi
call dword [sym.imp.MSVCR90.dll_ftell]
push 0
push 0
push edi
mov dword [ebx + 4], eax
call esi
add esp, 0x1c
cmp dword [ebx], 1
jne 0x415bd3
mov ebp, dword [esp + 0x1c]
push 0x5a8524
push ebp
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x415bd3
push 0x5a8524
push ebp
mov esi, 0x713
push 0x2efe
push esi
call fcn.00406f10
add esp, 0x10
jmp 0x415cf5
xor esi, esi
cmp dword [ebx], esi
jne 0x415c17
cmp dword [ebx + 8], esi
jne 0x415c0d
mov edx, dword [ebx + 4]
push edx
call dword [sym.imp.MSVCR90.dll_malloc]
add esp, 4
mov dword [ebx + 8], eax
cmp eax, esi
jne 0x415c09
mov eax, dword [ebx + 4]
push eax
mov esi, 0x717
push esi
call fcn.00406f10
add esp, 8
jmp 0x415cf5
mov dword [esp + 0x14], esi
mov ecx, dword [ebx + 8]
mov dword [esp + 0x18], ecx
mov dword [ebx + 4], esi
mov ebp, dword [sym.imp.MSVCR90.dll_fread]
push edi
push 0x7fa0
lea edx, [esp + 0x2c]
push 1
push edx
call ebp
mov esi, eax
add esp, 0x10
test esi, esi
jle 0x415c83
cmp dword [ebx], 0
lea eax, [esp + 0x24]
jne 0x415c55
mov ecx, dword [ebx + 4]
add ecx, dword [esp + 0x18]
push esi
push eax
push ecx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
add dword [ebx + 4], esi
jmp 0x415c6b
mov edx, dword [esp + 0x10]
push edx
push esi
push 1
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x415cbe
push edi
push 0x7fa0
lea ecx, [esp + 0x2c]
push 1
push ecx
call ebp
mov esi, eax
add esp, 0x10
test esi, esi
jg 0x415c35
cmp esi, 0xffffffff
jne 0x415c9a
mov edx, dword [esp + 0x20]
push edx
mov esi, 0x712
push 0x2efe
push esi
jmp 0x415cce
mov esi, dword [sym.imp.MSVCR90.dll_fclose]
push edi
call esi
mov eax, dword [esp + 0x14]
xor edi, edi
add esp, 4
cmp eax, edi
je 0x415d19
push eax
call esi
add esp, 4
test eax, eax
je 0x415d19
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x1c]
push eax
mov esi, 0x715
push 0x2efe
push esi
call fcn.00406f10
add esp, 0xc
cmp dword [esp + 0x14], 0
jne 0x415cf5
mov eax, dword [ebx + 8]
test eax, eax
je 0x415cf5
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov dword [ebx + 8], 0
test edi, edi
je 0x415d03
push edi
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x415d15
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov eax, esi
jmp 0x415d1b
xor eax, eax
mov ecx, dword [esp + 0x7fc4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00586584
add esp, 0x7fb8
ret