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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x88c
mov eax, dword [0x5023a4]
xor eax, esp
mov dword [esp + 0x888], eax
push ebx
push esi
push edi
push 0x208
lea eax, [esp + 0x27c]
mov ebx, ecx
push 0
push eax
mov dword [esp + 0x30], ebx
call fcn.0049b560
add esp, 0xc
lea eax, [esp + 0x480]
push 0x208
push 0
push eax
call fcn.0049b560
add esp, 0xc
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov edi, dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
jne 0x412cda
lea eax, [esp + 0x278]
push eax
push dword [esp + 0x14]
call edi
push dword [esp + 0x10]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x413025
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x278]
push eax
lea eax, [esp + 0x18]
push 0x4dc04c
push eax
call fcn.004040c0
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x48c]
add esp, 8
push eax
push esi
call fcn.00411ef0
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x278]
push eax
lea eax, [esp + 0x18]
push 0x4dc068
push eax
call fcn.004040c0
lea ecx, [esp + 0x48c]
add esp, 0xc
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412d50
sub ecx, edx
sar ecx, 1
jne 0x412d95
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x27c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x412d95
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x480]
push ecx
push eax
push esi
call fcn.00411ef0
jmp 0x412d99
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x480]
mov ecx, ebx
push eax
lea eax, [esp + 0x14]
push eax
call fcn.00412b20
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x413025
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
mov eax, dword [0x506568]
test eax, eax
jne 0x412dfc
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x414
push eax
lea eax, [esp + 0x20]
push str._s_resdesk.ico
push eax
call fcn.004040c0
mov ecx, dword [0x506568]
add esp, 0xc
test ecx, ecx
jne 0x412e43
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
cmp dword [ecx + 0x1ec4], 0
mov edx, 0x4da2d8
mov eax, 0x4da3b0
lea ecx, [esp + 0x20]
cmove eax, edx
push eax
call fcn.00403470
push 0x208
lea eax, [esp + 0x68c]
push 0
push eax
call fcn.0049b560
add esp, 0xc
mov dword [esp + 0x18], 0
lea eax, [esp + 0x18]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
or ebx, 0xffffffff
test eax, eax
jne 0x412fa6
lea eax, [esp + 0x688]
push eax
push dword [esp + 0x1c]
call edi
push dword [esp + 0x18]
mov esi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test esi, esi
je 0x412fa6
mov edi, dword [esp + 0x10]
mov eax, dword [edi - 0xc]
test eax, eax
jne 0x412ed9
push 5
push str._main
lea ecx, [esp + 0x18]
call fcn.00403760
jmp 0x412f06
js 0x412ef6
push str._main
push edi
call fcn.0049a763
add esp, 8
test eax, eax
je 0x412ef6
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
jne 0x412f0a
push 6
push str.__main
lea ecx, [esp + 0x18]
call fcn.00404010
mov edi, dword [esp + 0x10]
push 1
lea eax, [esp + 0x68c]
push eax
mov eax, dword [esp + 0x2c]
push dword [eax + 0x1ec4]
lea eax, [esp + 0x24]
push eax
call fcn.00413040
mov esi, dword [esp + 0x18]
cmp dword [esi - 4], 1
jle 0x412f42
push dword [esi - 0xc]
lea ecx, [esp + 0x1c]
call fcn.00403890
mov esi, dword [esp + 0x18]
push edi
push ecx
push dword [esp + 0x28]
lea eax, [esp + 0x694]
sub esp, 8
push esi
push eax
mov eax, dword [esp + 0x40]
add eax, 0xc34
push eax
push dword [esp + 0x3c]
call fcn.00411d10
push dword [esi - 8]
push esi
call fcn.004a38d8
add esp, 8
test eax, eax
js 0x41302f
cmp eax, dword [esi - 8]
jg 0x41302f
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x412faa
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x412faa
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412fc5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [esp + 0x1c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412fe0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x412ff7
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x413010
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x894]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0049765c
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402f10
push 0x80070057
call fcn.00402f10
int3