Function at 0x10002ec0
Capabilities:
Check if file exists
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [eax + 0x14], 8
jb 0x10002ece
mov eax, dword [eax]
push esi
push 0x40
push 0x10011644
push eax
call fcn.100059bd
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x10002f0f
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10002f08
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.file_is_NULL.
call esi
push 0x10011574
call esi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
push edi
push esi
push 1
push 4
push 0x100115f8
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
je 0x10002f44
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_kFileFormatVersion_FAILED.
jmp 0x10003144
mov eax, dword [ebx + 8]
push esi
push 1
lea ecx, [ebp - 0xc]
push 4
push ecx
mov dword [ebp - 0xc], eax
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
je 0x10002f7d
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_entryCount_FAILED.
jmp 0x10003144
push esi
push 1
lea edx, [ebp - 1]
push 1
push edx
mov byte [ebp - 1], 1
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
je 0x10002fb4
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_writeBuf_FAILED.
jmp 0x10003144
mov eax, dword [ebp - 0xc]
lea eax, [eax + eax*2]
lea ecx, [eax + eax + 0xf]
mov eax, dword [ebx + 4]
mov dword [ebp - 8], ecx
mov edi, dword [eax]
mov dword [ebp - 0x10], edi
cmp edi, eax
je 0x10003018
lea ecx, [ecx]
movzx edx, word [edi + 0xc]
push esi
push 1
lea eax, [ebp - 0x14]
push 2
push eax
mov dword [ebp - 0x14], edx
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
jne 0x10003052
push esi
push eax
lea ecx, [ebp - 8]
push 4
push ecx
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
jne 0x1000306f
mov edx, dword [edi + 0x14]
add dword [ebp - 8], edx
lea eax, [ebp - 0x10]
call fcn.10003300
mov edi, dword [ebp - 0x10]
cmp edi, dword [ebx + 4]
jne 0x10002fd0
push esi
push 1
lea eax, [ebp - 0x18]
push 2
push eax
mov dword [ebp - 0x18], 0
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
je 0x1000308c
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_resID2_FAILED.
jmp 0x10003144
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_resID_FAILED.
jmp 0x10003144
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_dataOffset_FAILED.
jmp 0x10003144
push esi
push 1
lea ecx, [ebp - 8]
push 4
push ecx
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
je 0x100030bf
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_dataOffset2_FAILED.
jmp 0x10003144
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
mov dword [ebp - 0x10], eax
cmp eax, ecx
je 0x100030fc
jmp 0x100030d0
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x100030ec
mov eax, dword [eax + 0x10]
push esi
push 1
push ecx
push eax
call fcn.10005cb0
add esp, 0x10
cmp eax, 1
jne 0x10003130
lea eax, [ebp - 0x10]
call fcn.10003300
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebx + 4]
jne 0x100030d0
push esi
call fcn.10005d97
add esp, 4
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003128
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x10011824
call esi
push 0x10011574
call esi
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
push str.C:_fxlog
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10003153
push str.fwrite_citor2__second.data___FAILED.
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call edi
push 0x10011574
call edi
push esi
call fcn.10005d97
add esp, 4
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret