Function at 0x401670
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x660
mov eax, dword [0x5965b0]
xor eax, esp
mov dword [esp + 0x65c], eax
push esi
mov esi, dword [ebp + 8]
push edi
jmp 0x4016a1
call fcn.00402e40
xor eax, eax
push 0x206
push eax
mov word [esp + 0x50], ax
lea eax, [esp + 0x52]
push eax
call fcn.005170e0
add esp, 0xc
xor eax, eax
push 0x206
push eax
mov word [esp + 0x258], ax
lea eax, [esp + 0x25a]
push eax
call fcn.005170e0
add esp, 0xc
lea eax, [esp + 0x458]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x4019cf
cmp eax, 0x104
ja 0x4019cf
lea ecx, [esp + 8]
call fcn.004022f0
push dword [eax]
lea eax, [esp + 0x254]
push 0x575744
push eax
call fcn.004052e0
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
or edi, 0xffffffff
add esp, 0xc
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x401746
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [esp + 8]
call fcn.00402560
push dword [eax]
lea eax, [esp + 0x4c]
push 0x575744
push eax
call fcn.004052e0
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
add esp, 0xc
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x401780
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x458]
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
call fcn.00403f00
lea eax, [esp + 0x250]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0
call fcn.00404010
add esp, 0xc
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0
call fcn.00404010
add esp, 0xc
push str.BINARY
push 0x69
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x401954
push eax
lea edx, [esp + 0x14]
mov ecx, esi
call fcn.00401a00
add esp, 4
test eax, eax
je 0x401954
push str.BINARY
push 0x66
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x401949
push eax
lea edx, [esp + 0x10]
mov ecx, esi
call fcn.00401a00
add esp, 4
test eax, eax
je 0x401949
mov eax, dword [esp + 0xc]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00404920
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00403750
add esp, 4
test eax, eax
jne 0x401865
push eax
push 0x40
push str.SetEngineDll_Fail
jmp 0x40195d
mov eax, dword [esp + 0x10]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.00404920
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00401af0
add esp, 4
test eax, eax
jne 0x401896
push eax
push 0x10
push str.Program
call fcn.004066f2
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x10]
call fcn.00515d2d
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 8
test eax, eax
jne 0x4018e6
push dword [esp + 0xc]
call esi
test eax, eax
jne 0x4018e6
push 0x5757d4
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x10]
push eax
call fcn.00404010
add esp, 0xc
push 0
push 0x10
push dword [eax]
call fcn.004066f2
lea ecx, [esp + 8]
call fcn.00403fc0
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x14]
call fcn.00515d2d
add esp, 8
test eax, eax
jne 0x401930
push dword [esp + 0x10]
call esi
test eax, eax
jne 0x401930
push 0x5757d4
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x10]
push eax
call fcn.00404010
add esp, 0xc
push 0
push 0x10
push dword [eax]
call fcn.004066f2
lea ecx, [esp + 8]
call fcn.00403fc0
call fcn.00403d50
jmp 0x401947
jmp 0x401962
push 0
push 0
push str.engine
jmp 0x40195d
push 0
push 0
push str.exe1
call fcn.004066f2
mov edx, dword [esp + 0xc]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40197f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [esp + 0x10]
add edx, 0xfffffff0
mov ecx, edi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40199c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x4019dd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x65c]
xor ecx, esp
call fcn.00514e2d
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 0x575710
call fcn.004066f2
mov ecx, dword [esp + 0x664]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.00514e2d
mov esp, ebp
pop ebp
ret 0x10