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

Disassembly:
sub esp, 0x208
mov eax, dword [0x40e004]
xor eax, esp
mov dword [esp + 0x204], eax
cmp dword [0x40f0c0], 0
je 0x401257
mov eax, 1
mov ecx, dword [esp + 0x204]
xor ecx, esp
call fcn.00401986
add esp, 0x208
ret
push ebx
push ebp
push esi
push edi
push 0x40b23c
push 0x6d
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4012ba
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
cmp edi, 0x64
ja 0x401398
push esi
push 0
call ebx
push eax
call ebp
mov esi, eax
push edi
push esi
call fcn.004011e0
add esp, 8
test eax, eax
je 0x401398
push esi
call fcn.00401e03
add esp, 4
mov dword [0x40f0cc], eax
push 0x40b238
push 0x6e
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x40130d
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
cmp edi, 0x64
ja 0x401398
push esi
push 0
call ebx
push eax
call ebp
mov esi, eax
push edi
push esi
call fcn.004011e0
add esp, 8
test eax, eax
je 0x401398
push esi
call fcn.00401e03
add esp, 4
mov dword [0x40f0c4], eax
push 0x40b234
push 0x6f
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x40135c
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
cmp edi, 0x64
ja 0x401398
push esi
push 0
call ebx
push eax
call ebp
mov esi, eax
push edi
push esi
call fcn.004011e0
add esp, 8
test eax, eax
je 0x401398
push 0x64
push esi
push 0x64
push 0x40f058
call fcn.00401d3f
add esp, 0x10
push 0x40b230
push 0x70
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x401499
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov edi, eax
call ebx
push eax
call ebp
mov esi, eax
push edi
push esi
call fcn.004011e0
add esp, 8
test eax, eax
jne 0x40139f
xor eax, eax
jmp 0x40149e
lea eax, [esp + 0x114]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x14]
push ecx
push 0
push 0x40b22c
lea edx, [esp + 0x120]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x40b228
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0
call fcn.00401cef
mov eax, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x401499
push eax
push 1
push edi
push esi
call fcn.00401b9e
mov edx, dword [esp + 0x20]
mov esi, eax
sub esi, 1
neg esi
sbb esi, esi
push edx
add esi, 1
call fcn.00401a08
add esp, 0x14
test esi, esi
je 0x401485
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x401485
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40b230
push esi
call edi
push 0x40b234
push esi
mov dword [0x40f0d0], eax
call edi
push 0x40b23c
push esi
mov dword [0x40f0d4], eax
call edi
cmp dword [0x40f0d0], 0
mov dword [0x40f0d8], eax
je 0x40147e
cmp dword [0x40f0d4], 0
je 0x40147e
test eax, eax
je 0x40147e
mov dword [0x40f0c0], 1
jmp 0x401499
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x40f0c0], 0
jne 0x401499
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [0x40f0c0]
mov ecx, dword [esp + 0x214]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00401986
add esp, 0x208
ret