Function at 0x412090
Capabilities:
Check if file exists
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4712a1
mov eax, dword fs:[0]
push eax
sub esp, 0x3a0
mov eax, dword [0x4950d4]
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 eax, ecx
mov dword [ebp - 0x3a4], eax
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
call fcn.00411c90
mov eax, dword [0x4990f0]
test eax, eax
jne 0x41210c
push 0x54
call fcn.0041508d
add esp, 4
mov dword [ebp - 0x3a0], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x4120fe
mov ecx, eax
call fcn.00408440
jmp 0x412100
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x4990f0], eax
mov ecx, eax
call fcn.00408af0
mov edx, eax
mov dword [ebp - 0x380], 7
xor eax, eax
mov dword [ebp - 0x384], 0
mov word [ebp - 0x394], ax
cmp word [edx], ax
jne 0x41213b
xor ecx, ecx
jmp 0x41214f
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412140
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x394]
call fcn.0040a200
xor eax, eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x320], 7
mov dword [ebp - 0x324], 0
mov word [ebp - 0x334], ax
cmp word [esi], ax
jne 0x412189
xor ecx, ecx
jmp 0x41219f
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412190
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x334]
call fcn.0040a200
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.004572d0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x218]
push eax
call fcn.0045575f
add esp, 4
push 0x476864
push str.7zData
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x4125f8
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push ebx
mov dword [ebp - 0x3a0], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x1869f
push 0x2710
mov dword [ebp - 0x3a8], eax
call fcn.0045600f
cdq
push edx
push eax
lea eax, [ebp - 0x364]
push eax
call fcn.0045611b
add esp, 0x14
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 3
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x412253
mov eax, dword [str.WanNengZip]
lea edi, [ebp - 0x218]
mov dword [ecx], eax
add edi, 0xfffffffe
mov eax, dword [0x476248]
mov dword [ecx + 4], eax
mov eax, dword [0x47624c]
mov dword [ecx + 8], eax
mov eax, dword [0x476250]
mov dword [ecx + 0xc], eax
mov eax, dword [0x476254]
mov dword [ecx + 0x10], eax
mov ax, word [0x476258]
mov word [ecx + 0x14], ax
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4122a0
cmp dword [ebp - 0x350], 8
lea edx, [ebp - 0x364]
mov eax, dword [0x476880]
cmovae edx, dword [ebp - 0x364]
mov dword [edi], eax
mov esi, edx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4122d0
lea edi, [ebp - 0x218]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4122e6
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x218]
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x412310
mov eax, dword [0x476884]
mov dword [ecx], eax
mov eax, dword [str.zData.7z]
mov dword [ecx + 4], eax
mov eax, dword [0x47688c]
mov dword [ecx + 8], eax
mov eax, dword [0x476890]
mov dword [ecx + 0xc], eax
mov eax, dword [0x476894]
mov dword [ecx + 0x10], eax
mov ax, word [0x476898]
mov word [ecx + 0x14], ax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41236d
lea eax, [ebp - 0x218]
push eax
call fcn.00455a6b
add esp, 4
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4123c0
push 0
lea eax, [ebp - 0x39c]
mov dword [ebp - 0x39c], 0
push eax
push dword [ebp - 0x3a8]
push dword [ebp - 0x3a0]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea eax, [ebp - 0x31c]
push 0
push eax
call fcn.004572d0
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.004563e0
cmp dword [ebp - 0x320], 8
lea ecx, [ebp - 0x3ac]
push ecx
push fcn.00412a70
lea ecx, [ebp - 0x31c]
mov dword [ebp - 0x3ac], 0
lea eax, [ebp - 0x334]
cmovae eax, dword [ebp - 0x334]
push ecx
push eax
call fcn.00401cb0
add esp, 0x24
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x395]
call fcn.00418270
push ebx
lea ecx, [ebp - 0x395]
mov byte [ebp - 4], 4
call fcn.00412fe0
lea ecx, [ebp - 0x395]
mov byte [ebp - 4], 3
call fcn.004067e0
lea ecx, [ebp - 0x39c]
call fcn.00418270
lea ecx, [ebp - 0x39c]
mov byte [ebp - 4], 5
call fcn.00410c10
lea ecx, [ebp - 0x39c]
mov byte [ebp - 4], 3
call fcn.004067e0
mov ecx, dword [ebp - 0x3a4]
call fcn.00411880
mov ecx, dword [ebp - 0x3a4]
call fcn.00412670
mov eax, dword [0x4990f0]
test eax, eax
jne 0x4124c9
push 0x54
call fcn.0041508d
add esp, 4
mov dword [ebp - 0x3a4], eax
mov byte [ebp - 4], 6
test eax, eax
je 0x4124be
mov ecx, eax
call fcn.00408440
jmp 0x4124c0
xor eax, eax
mov byte [ebp - 4], 3
mov dword [0x4990f0], eax
push str.FinishDelSfxFile
lea ecx, [ebp - 0x34c]
push ecx
mov ecx, eax
call fcn.004089f0
cmp dword [ebp - 0x338], 8
lea eax, [ebp - 0x34c]
push 4
cmovae eax, dword [ebp - 0x34c]
push str.true
push dword [ebp - 0x33c]
mov byte [ebp - 4], 7
push eax
call fcn.00409dd0
add esp, 0x10
test eax, eax
jne 0x412569
call fcn.004099c0
mov ecx, eax
call fcn.00408b00
push eax
lea ecx, [ebp - 0x37c]
call fcn.004083e0
cmp dword [ebp - 0x368], 8
lea eax, [ebp - 0x37c]
mov byte [ebp - 4], 8
cmovae eax, dword [ebp - 0x37c]
push eax
call fcn.00455a6b
mov eax, dword [ebp - 0x368]
add esp, 4
mov byte [ebp - 4], 7
cmp eax, 8
jb 0x412569
inc eax
lea ecx, [ebp - 0x37c]
push eax
push dword [ebp - 0x37c]
call fcn.0040a300
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0xffffffffffffff9c
push 0x64
call fcn.00412a70
mov eax, dword [ebp - 0x338]
add esp, 8
cmp eax, 8
jb 0x4125a0
inc eax
lea ecx, [ebp - 0x34c]
push eax
push dword [ebp - 0x34c]
call fcn.0040a300
xor eax, eax
mov dword [ebp - 0x338], 7
mov word [ebp - 0x34c], ax
mov eax, dword [ebp - 0x350]
mov dword [ebp - 0x33c], 0
cmp eax, 8
jb 0x4125db
inc eax
lea ecx, [ebp - 0x364]
push eax
push dword [ebp - 0x364]
call fcn.0040a300
xor eax, eax
mov dword [ebp - 0x350], 7
mov dword [ebp - 0x354], 0
mov word [ebp - 0x364], ax
mov eax, dword [ebp - 0x320]
cmp eax, 8
jb 0x412616
inc eax
lea ecx, [ebp - 0x334]
push eax
push dword [ebp - 0x334]
call fcn.0040a300
xor eax, eax
mov dword [ebp - 0x320], 7
mov word [ebp - 0x334], ax
mov eax, dword [ebp - 0x380]
mov dword [ebp - 0x324], 0
cmp eax, 8
jb 0x412651
inc eax
lea ecx, [ebp - 0x394]
push eax
push dword [ebp - 0x394]
call fcn.0040a300
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.00415020
mov esp, ebp
pop ebp
ret 0xc