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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4713b1
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
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 esi, dword [ebp + 8]
lea eax, [ebp - 0x218]
push 0x208
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 str.REGRES
push str.REGDATA
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x413379
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x1869f
push 0x2710
mov dword [ebp - 0x268], eax
call fcn.0045600f
cdq
push edx
push eax
lea eax, [ebp - 0x260]
push eax
call fcn.0045611b
add esp, 0x14
push 0xa
xor eax, eax
mov dword [ebp - 4], 0
push str.WanNengZip
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
call fcn.0040a200
push 1
push 0x476880
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
call fcn.00409fb0
cmp dword [ebp - 0x24c], 8
lea edx, [ebp - 0x260]
cmovae edx, dword [ebp - 0x260]
cmp word [edx], 0
jne 0x41310d
xor ecx, ecx
jmp 0x413121
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413112
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.00409fb0
push 0xc
push str._Regedit.reg
lea ecx, [ebp - 0x230]
call fcn.00409fb0
cmp dword [ebp - 0x21c], 8
lea edx, [ebp - 0x230]
cmovae edx, dword [ebp - 0x230]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x413156
lea edi, [ebp - 0x218]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x413170
mov ecx, edx
lea eax, [ebp - 0x218]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4131aa
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 0x4131f8
push 0
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 0
push eax
push dword [ebp - 0x268]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xb
xor eax, eax
mov dword [ebp - 0x234], 7
push str.regedit__s
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
call fcn.0040a200
cmp word [ebp - 0x218], 0
mov byte [ebp - 4], 2
jne 0x413239
xor ecx, ecx
jmp 0x413251
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413242
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.00409fb0
push 1
push 0x476990
lea ecx, [ebp - 0x248]
call fcn.00409fb0
cmp dword [ebp - 0x21c], 8
lea edx, [ebp - 0x230]
cmovae edx, dword [ebp - 0x230]
cmp word [edx], 0
jne 0x413294
xor ecx, ecx
jmp 0x4132af
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4132a0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x248]
call fcn.00409fb0
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
cmovae eax, dword [ebp - 0x248]
push eax
call fcn.00455a47
lea eax, [ebp - 0x218]
push eax
call fcn.0045627e
mov eax, dword [ebp - 0x234]
add esp, 8
cmp eax, 8
jb 0x413303
inc eax
lea ecx, [ebp - 0x248]
push eax
push dword [ebp - 0x248]
call fcn.0040a300
xor eax, eax
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x238], 0
cmp eax, 8
jb 0x41333e
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.0040a300
xor eax, eax
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x220], 0
cmp eax, 8
jb 0x413379
inc eax
lea ecx, [ebp - 0x260]
push eax
push dword [ebp - 0x260]
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 4