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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418e46
mov eax, dword fs:[0]
push eax
mov eax, 0x16ac
call fcn.0040b3a0
mov eax, dword [0x42031c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0xc24], eax
mov word [ebp - 0xb44], 0
push 0x206
push 0
lea eax, [ebp - 0xb42]
push eax
call fcn.0040b3d0
add esp, 0xc
mov word [ebp - 0x103c], 0
push 0x206
push 0
lea ecx, [ebp - 0x103a]
push ecx
call fcn.0040b3d0
add esp, 0xc
mov word [ebp - 0x654], 0
push 0x206
push 0
lea edx, [ebp - 0x652]
push edx
call fcn.0040b3d0
add esp, 0xc
mov word [ebp - 0x44c], 0
push 0x206
push 0
lea eax, [ebp - 0x44a]
push eax
call fcn.0040b3d0
add esp, 0xc
mov word [ebp - 0xe34], 0
push 0x206
push 0
lea ecx, [ebp - 0xe32]
push ecx
call fcn.0040b3d0
add esp, 0xc
mov dword [ebp - 0xb50], 0
mov dword [ebp - 0x72c], 0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x658], 0
mov dword [ebp - 0x938], 0
mov dword [ebp - 0xb54], 0
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0xb44]
push eax
call fcn.0040b50a
add esp, 8
push 0x64
lea ecx, [ebp - 0x724]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x64
lea eax, [ebp - 0xc1c]
push eax
push 2
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x41a90c
lea edx, [ebp - 0x724]
push edx
push str._s__s
lea eax, [ebp - 0x103c]
push eax
call fcn.00407af0
add esp, 0x10
lea ecx, [ebp - 0xb44]
push ecx
lea ecx, [ebp - 0x728]
call fcn.00407bb0
mov dword [ebp - 4], 0
lea edx, [ebp - 0xb44]
push edx
lea ecx, [ebp - 0xc20]
call fcn.00407bb0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x728]
call fcn.00407db0
mov dword [ebp - 0xc28], 0xffffffff
push str._noalert
lea ecx, [ebp - 0x728]
call fcn.00407e90
mov dword [ebp - 0xc28], eax
cmp dword [ebp - 0xc28], 0
jl 0x4049e3
push 8
mov eax, dword [ebp - 0xc28]
push eax
lea ecx, [ebp - 0xc20]
call fcn.00407f40
lea ecx, [ebp - 0xc20]
call fcn.00407b30
push eax
lea ecx, [ebp - 0xb44]
push ecx
call fcn.0040b50a
add esp, 8
call fcn.00405e60
mov byte [ebp - 0xb49], al
movzx edx, byte [ebp - 0xb49]
test edx, edx
je 0x404ad9
cmp dword [ebp - 0xc28], 0
jge 0x404ad9
call fcn.00405e10
mov byte [ebp - 0x103e], al
call fcn.00405e50
mov byte [ebp - 0x103d], al
movzx eax, byte [ebp - 0x103e]
test eax, eax
jne 0x404ad9
movzx ecx, byte [ebp - 0x103d]
test ecx, ecx
jne 0x404ad9
mov word [ebp - 0x110c], 0
push 0xc6
push 0
lea edx, [ebp - 0x110a]
push edx
call fcn.0040b3d0
add esp, 0xc
push 0x64
lea eax, [ebp - 0x110c]
push eax
push 3
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_LoadStringW]
lea edx, [ebp - 0x110c]
push edx
push str._s_______r_nWindows_OS____._r_n_r_nWindows_OS___ID_____.
lea eax, [ebp - 0x129c]
push eax
call fcn.00407af0
add esp, 0xc
push 0
push 0x41a9fc
lea ecx, [ebp - 0x129c]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [ebp - 0x16b0], 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xc20]
call fcn.00407b40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x728]
call fcn.00407b40
mov eax, dword [ebp - 0x16b0]
jmp 0x40501f
lea edx, [ebp - 0x654]
push edx
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x654]
push eax
push 0x41aa18
lea ecx, [ebp - 0x44c]
push ecx
call fcn.00407af0
add esp, 0x10
push 0
lea edx, [ebp - 0x44c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [ebp - 0x934], 0
push 0x206
push 0
lea eax, [ebp - 0x932]
push eax
call fcn.0040b3d0
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x934]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov word [ebp - 0x240], 0
xor edx, edx
mov dword [ebp - 0x23e], edx
mov dword [ebp - 0x23a], edx
mov dword [ebp - 0x236], edx
mov dword [ebp - 0x232], edx
mov word [ebp - 0x22e], dx
push 0x105
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 3
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x240]
push edx
call fcn.0040bb89
add esp, 0xc
lea eax, [ebp - 0x240]
push eax
call fcn.00405c80
add esp, 4
mov dword [ebp - 0x22c], eax
lea ecx, [ebp - 0x934]
push ecx
call fcn.00405640
add esp, 4
lea edx, [ebp - 0x934]
push edx
lea eax, [ebp - 0x44c]
push eax
push 0x41aa28
lea ecx, [ebp - 0xe34]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push str.APP_SETUP
push 0x89
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0xb50], eax
mov eax, dword [ebp - 0xb50]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x228], eax
mov edx, dword [ebp - 0xb50]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x72c], eax
cmp dword [ebp - 0x72c], 0
je 0x404e8a
cmp dword [ebp - 0x228], 0
je 0x404e8a
mov dword [ebp - 0x658], 0
mov ecx, dword [ebp - 0x72c]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x658], eax
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
lea edx, [ebp - 0xe34]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x938], eax
cmp dword [ebp - 0x938], 0
je 0x404cfc
cmp dword [ebp - 0x938], 0xffffffff
je 0x404cfc
push 0
push 0
push 0
mov eax, dword [ebp - 0x938]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0xb54]
push ecx
mov edx, dword [ebp - 0x228]
push edx
mov eax, dword [ebp - 0x658]
push eax
mov ecx, dword [ebp - 0x938]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x938], 0
je 0x404ced
mov edx, dword [ebp - 0x938]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x938], 0
jmp 0x404e8a
push 0x104
push 0
lea eax, [ebp - 0x654]
push eax
call fcn.0040b3d0
add esp, 0xc
push 0x104
push 0
lea ecx, [ebp - 0x44c]
push ecx
call fcn.0040b3d0
add esp, 0xc
push 0x104
push 0
lea edx, [ebp - 0xe34]
push edx
call fcn.0040b3d0
add esp, 0xc
push 0x208
lea eax, [ebp - 0x654]
push eax
call fcn.004073f0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea ecx, [ebp - 0x654]
push ecx
push str._s_08x
lea edx, [ebp - 0x44c]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x934]
push eax
lea ecx, [ebp - 0x44c]
push ecx
push 0x41aa58
lea edx, [ebp - 0xe34]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
lea eax, [ebp - 0xe34]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x938], eax
cmp dword [ebp - 0x938], 0
je 0x404e28
cmp dword [ebp - 0x938], 0xffffffff
je 0x404e28
push 0
push 0
push 0
mov ecx, dword [ebp - 0x938]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0xb54]
push edx
mov eax, dword [ebp - 0x228]
push eax
mov ecx, dword [ebp - 0x658]
push ecx
mov edx, dword [ebp - 0x938]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x938], 0
je 0x404e1c
mov eax, dword [ebp - 0x938]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x938], 0
jmp 0x404e3e
push 0
lea ecx, [ebp - 0x103c]
push ecx
push str.Temp___.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea edx, [ebp - 0xe34]
push edx
lea eax, [ebp - 0x44c]
push eax
call fcn.00405040
add esp, 8
mov dword [ebp - 0x16b4], 0xffffffff
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xc20]
call fcn.00407b40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x728]
call fcn.00407b40
mov eax, dword [ebp - 0x16b4]
jmp 0x40501f
lea ecx, [ebp - 0xb44]
push ecx
lea edx, [ebp - 0xe34]
push edx
call fcn.00405560
add esp, 8
mov dword [ebp - 0xb48], eax
lea eax, [ebp - 0xe34]
push eax
lea ecx, [ebp - 0x44c]
push ecx
call fcn.00405040
add esp, 8
cmp dword [ebp - 0xb48], 0
jne 0x404fe6
mov word [ebp - 0x14a4], 0
push 0x206
push 0
lea edx, [ebp - 0x14a2]
push edx
call fcn.0040b3d0
add esp, 0xc
mov word [ebp - 0x16ac], 0
push 0x206
push 0
lea eax, [ebp - 0x16aa]
push eax
call fcn.0040b3d0
add esp, 0xc
lea ecx, [ebp - 0x16ac]
push ecx
push 0x23
call fcn.00405d80
add esp, 8
lea edx, [ebp - 0x16ac]
push edx
call fcn.0040b80b
add esp, 4
test eax, eax
jne 0x404f50
lea eax, [ebp - 0x724]
push eax
lea ecx, [ebp - 0x654]
push ecx
push 0x41aa8c
lea edx, [ebp - 0x14a4]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
jmp 0x404f73
lea eax, [ebp - 0x724]
push eax
lea ecx, [ebp - 0x16ac]
push ecx
push str._s_s.ini
lea edx, [ebp - 0x14a4]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x724]
push eax
call fcn.004051a0
add esp, 4
lea ecx, [ebp - 0x724]
push ecx
call fcn.00405090
add esp, 4
lea edx, [ebp - 0xc1c]
push edx
lea eax, [ebp - 0x724]
push eax
call fcn.00405810
add esp, 8
lea ecx, [ebp - 0x724]
push ecx
call fcn.004059b0
add esp, 4
call fcn.004078d0
lea edx, [ebp - 0x724]
push edx
call fcn.00405ec0
add esp, 4
lea eax, [ebp - 0x724]
push eax
call fcn.00405b50
add esp, 4
lea ecx, [ebp - 0x14a4]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov edx, dword [ebp - 0xb48]
mov dword [ebp - 0x16b8], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xc20]
call fcn.00407b40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x728]
call fcn.00407b40
mov eax, dword [ebp - 0x16b8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040b382
mov esp, ebp
pop ebp
ret 0x10