Function at 0x4130d9
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov eax, dword [0x81c5a8]
xor eax, ebp
mov dword [ebp + 0x398], eax
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x610]
push esi
mov dword [ebp - 0x78], esi
call fcn.0068cf40
xor ebx, ebx
cmp eax, ebx
pop ecx
jle 0x413147
cmp byte [edi + eax + 0x60f], 0x5c
lea eax, [edi + 0xa10]
push eax
mov dword [ebp - 0x74], eax
push esi
lea eax, [ebp + 0x198]
mov esi, 0x200
jne 0x413136
push 0x720f84
jmp 0x41313b
push 0x720f7c
push esi
push eax
call fcn.00403c35
add esp, 0x14
jmp 0x41316b
lea eax, [edi + 0xa10]
push eax
push 0x753f50
mov dword [ebp - 0x74], eax
mov esi, 0x200
lea eax, [ebp + 0x198]
push esi
push eax
call fcn.00403c35
add esp, 0x10
push ebx
push 0x80
push 3
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push SysReAllocStringLen
lea eax, [ebp + 0x198]
push eax
call ebx
cmp eax, 0xffffffff
je 0x41319c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x413316
push dword [ebp + 0x3a4]
call fcn.00412e93
pop ecx
test eax, eax
jne 0x4131b6
mov eax, 0x5007
jmp 0x413316
lea eax, [edi + 0x810]
cmp byte [eax], 0
je 0x4131d5
push eax
lea eax, [ebp - 0x68]
push esi
push eax
call fcn.0067eece
add esp, 0xc
lea eax, [ebp - 0x68]
push eax
jmp 0x4131d7
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x4131ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x413316
movzx eax, word [ebp + 0x3a4]
push 0xa
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x6c], eax
test eax, eax
je 0x4131e3
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4131e3
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push dword [ebp - 0x6c]
mov dword [ebp - 0x7c], eax
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x6c], eax
xor eax, eax
cmp dword [ebp - 0x6c], eax
je 0x4131e3
push eax
push 0x80
push 2
push eax
push eax
mov edi, 0xc0000000
push edi
lea eax, [ebp + 0x198]
push eax
call ebx
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
jne 0x4132e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp + 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push edi
lea eax, [ebp + 0x198]
push eax
call ebx
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
jne 0x4132e9
lea eax, [ebp + 0x198]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x4132e9
push 0x768238
lea eax, [ebp + 0x198]
push esi
push eax
call fcn.00403c7f
push dword [ebp - 0x74]
lea eax, [ebp + 0x198]
push esi
push eax
call fcn.00403c7f
add esp, 0x18
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push edi
lea eax, [ebp + 0x198]
push eax
call ebx
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
je 0x4131e3
push dword [ebp - 0x78]
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
xor esi, esi
push esi
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0x6c]
push dword [ebp - 0x7c]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41330b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00647fba
add ebp, 0x39c
leave
ret 4