Function at 0x1012f87
Capabilities:
Check if file exists
Write file on windows

Disassembly:
sub esp, 0xef0
push ebx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathCombineW]
push ebp
push esi
push edi
mov ebp, 0x1001e48
push ebp
push 0x103ddf8
mov edi, 0x108cc68
push edi
call ebx
call fcn.0102c70c
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push eax
push edi
call esi
push 0x103c550
push edi
call esi
push edi
call fcn.0102eda3
push ebp
mov ebp, 0x103dbf0
push ebp
lea eax, [esp + 0xa8]
push eax
call ebx
call fcn.0102c70c
push eax
lea eax, [esp + 0xa4]
push eax
call esi
push 0x103c550
lea eax, [esp + 0xa4]
push eax
call esi
cmp dword [0x103e864], 0
je 0x1013097
push ebp
mov ebp, dword [sym.imp.SHLWAPI.dll_StrCpyW]
push 0x1045090
call ebp
push edi
push 0x10466b0
call ebp
xor ebp, ebp
cmp dword [0x103e864], ebp
mov dword [0x108f2cc], ebp
je 0x1013097
lea eax, [esp + 0xa0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1013097
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1013097
push ebp
push edi
push 0x10027b0
lea eax, [esp + 0xac]
push eax
call fcn.0102c1fa
push ebp
push edi
push 0x10027a4
lea eax, [esp + 0xac]
push eax
call fcn.0102c1fa
push ebp
push edi
push 0x1002798
lea eax, [esp + 0xac]
push eax
call fcn.0102c1fa
push ebp
push edi
push 0x100278c
lea eax, [esp + 0xac]
push eax
call fcn.0102c1fa
push 0x1002774
push edi
call esi
push 0x1002158
push 0x103d3b8
mov ebp, 0x10464a8
push ebp
call ebx
push 0x103c550
push ebp
call esi
push 0x100274c
push ebp
call esi
push 0x1002774
push 0x103d3b8
mov ebp, 0x10466b0
push ebp
call ebx
lea eax, [esp + 0x4b0]
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_Ordinal_65]
cmp eax, 0xffffffff
jne 0x10130f3
push 0
push edi
push ebp
call dword [sym.imp.SHLWAPI.dll_Ordinal_112]
jmp 0x10130fa
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
call fcn.01012f40
push 0
call fcn.0100ea2d
push 0x104
mov ebp, 0x108ce98
push ebp
xor edi, edi
push edi
call dword [sym.imp.SHLWAPI.dll_Ordinal_80]
push 0x5c
push edi
push ebp
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
cmp eax, edi
je 0x101312b
mov word [eax], di
push 0x1002088
push ebp
call esi
push 0x103c550
push ebp
call esi
push ebp
call fcn.0102eda3
push 0x1001e48
push 0x103ddf8
mov edi, 0x108c650
push edi
call ebx
call fcn.0102c70c
push eax
push edi
call esi
push 0x103c550
push edi
call esi
push 0x1002734
push edi
call esi
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x1013198
push 0x1002734
push ebp
lea eax, [esp + 0x2b0]
push eax
call ebx
push 0
push edi
lea eax, [esp + 0x2b0]
push eax
call dword [sym.imp.SHLWAPI.dll_Ordinal_112]
push 0x1045090
mov ebx, 0x1046090
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push 0x100271c
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCatW]
push ebp
mov ebp, 0x1046298
push ebp
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push 0x1002714
push ebp
call esi
push ebp
call fcn.0102eda3
push 0x10026fc
push ebp
call esi
push ebp
push 0x103e874
call fcn.01007b53
push edi
push 0x103e878
call fcn.01007bc3
mov eax, dword [0x103e878]
xor ebx, ebx
cmp eax, ebx
jne 0x1013251
cmp dword [0x103e410], ebx
je 0x1013373
push 0x104
lea eax, [esp + 0x2ac]
push eax
push 0x88c4
push dword [0x103d7d0]
call dword [sym.imp.SHLWAPI.dll_Ordinal_107]
push ebx
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
lea eax, [esp + 0x2b4]
push eax
push dword [0x103e410]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1013373
mov ecx, dword [eax]
push ebx
push 0x4e
lea edx, [esp + 0x1c]
push edx
push eax
call dword [ecx + 8]
test eax, eax
jl 0x10132d4
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jl 0x10132ca
mov edi, 0x10468b8
push 8
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
je 0x1013296
push dword [esp + 0x10]
mov ecx, eax
call fcn.01007700
mov esi, eax
jmp 0x1013298
xor esi, esi
mov eax, dword [esi]
push 0x40
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [eax]
mov ax, word [esp + 0x20]
mov word [edi], ax
inc edi
push 1
mov ecx, esi
inc edi
call fcn.01011cc9
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
jge 0x101327b
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [0x103e878]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x100223c
push eax
call dword [ecx + 4]
test eax, eax
jge 0x1013306
mov eax, dword [0x103e878]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x10026d8
push eax
call dword [ecx + 4]
test eax, eax
jl 0x101332c
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x20]
push edx
push eax
call dword [ecx + 0x20]
push dword [esp + 0x10]
push dword [esp + 0x20]
push 0x108f970
call fcn.0102f07b
push ebp
push 0x400
lea eax, [esp + 0x708]
push eax
push ebx
push ebx
push ebx
call fcn.0102d0a7
mov esi, eax
shr esi, 2
add esi, 0x14
imul esi, esi, 0xb74
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, esi
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [0x108ce7c], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xef0
ret