Function at 0x412de3
Capabilities:
Create directory
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 [0x5c8810]
xor eax, ebp
mov dword [ebp + 0x398], eax
push ebx
push esi
push edi
mov edi, ecx
call fcn.00412aca
lea ebx, [edi + 0x610]
push 0
push ebx
mov dword [ebp - 0x78], ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov esi, 0x200
test eax, eax
jne 0x412e41
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x412e41
lea eax, [edi + 0x410]
push eax
push esi
push ebx
call fcn.00531f88
add esp, 0xc
push ebx
call fcn.00530f80
pop ecx
test eax, eax
jle 0x412e7f
cmp byte [edi + eax + 0x60f], 0x5c
lea eax, [edi + 0xa10]
push eax
mov dword [ebp - 0x74], eax
push ebx
lea eax, [ebp + 0x198]
jne 0x412e6e
push str._s_s
jmp 0x412e73
push 0x5666c0
push esi
push eax
call fcn.00415470
add esp, 0x14
jmp 0x412e9e
lea eax, [edi + 0xa10]
push eax
push 0x5649f8
mov dword [ebp - 0x74], eax
lea eax, [ebp + 0x198]
push esi
push eax
call fcn.00415470
add esp, 0x10
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor eax, eax
push eax
push 0x80
push 3
push eax
push eax
push SysReAllocString
lea eax, [ebp + 0x198]
push eax
call ebx
cmp eax, 0xffffffff
je 0x412ed1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x41304b
push dword [ebp + 0x3a4]
call fcn.00412b9e
pop ecx
test eax, eax
jne 0x412eeb
mov eax, 0x5007
jmp 0x41304b
lea eax, [edi + 0x810]
cmp byte [eax], 0
je 0x412f0a
push eax
lea eax, [ebp - 0x68]
push esi
push eax
call fcn.00531f88
add esp, 0xc
lea eax, [ebp - 0x68]
push eax
jmp 0x412f0c
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x412f23
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41304b
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 0x412f18
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x412f18
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 0x412f18
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 0x41301e
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 0x41301e
lea eax, [ebp + 0x198]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x41301e
push 0x5666d0
lea eax, [ebp + 0x198]
push esi
push eax
call fcn.00415550
push dword [ebp - 0x74]
lea eax, [ebp + 0x198]
push esi
push eax
call fcn.00415550
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 0x412f18
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 0x413040
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.0053081c
add ebp, 0x39c
leave
ret 4