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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cc5c0
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x513b94]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x224], ecx
mov eax, dword [ebp + 8]
xor bl, bl
mov esi, dword [ebp + 0xc]
push 0x4dda54
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x414089
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x218]
push eax
push 0
push 0x4dda5c
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x21c], eax
cmp eax, 0xffffffff
je 0x414089
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x413f4e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, dword [ebp - 0x21c]
test eax, eax
je 0x413f54
push 0
lea ecx, [ebp - 0x228]
push ecx
push dword [ebp - 0x220]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
setne bl
jmp 0x413f54
mov esi, dword [ebp - 0x21c]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x41407c
lea eax, [ebp - 0x21c]
push eax
call fcn.00410fd0
add esp, 4
mov esi, dword [ebp - 0x21c]
lea eax, [ebp - 0x218]
push eax
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.004104b0
test al, al
jne 0x413fa8
test esi, esi
je 0x413fa1
push esi
lea ecx, [ebp - 0x21c]
call fcn.00411670
xor bl, bl
jmp 0x41407c
mov eax, dword [ebp - 0x224]
lea ecx, [eax + 4]
mov byte [eax + 0x48], 0
lea eax, [ebp - 0x21c]
cmp ecx, eax
je 0x413fd1
mov edx, dword [ecx]
mov eax, esi
xor esi, esi
mov dword [ecx], eax
test edx, edx
je 0x413fd1
push edx
call fcn.00411670
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x41407a
push 0x4113a0
push 0x1f
push 4
lea eax, [esi + 0x88]
mov dword [ebp - 4], 1
push eax
call fcn.004a1363
mov eax, dword [esi + 0x84]
mov edi, dword [sym.imp.GDI32.dll_DeleteObject]
test eax, eax
je 0x41401d
push eax
call edi
test eax, eax
je 0x41401d
mov dword [esi + 0x84], 0
mov eax, dword [esi + 0x80]
test eax, eax
je 0x414038
push eax
call edi
test eax, eax
je 0x414038
mov dword [esi + 0x80], 0
mov edx, dword [esi + 4]
or edi, 0xffffffff
sub edx, 0x10
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x414055
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [esi]
sub edx, 0x10
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x41406c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x184
push esi
call fcn.004a0e51
add esp, 8
mov bl, 1
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a0e13
mov esp, ebp
pop ebp
ret 8