Function at 0x40ea60
Capabilities:
Create directory
Delete directory
Delete file
Get common file path

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x420]
lea edi, [ebp - 0x474]
push ebx
lea ebx, [ebp - 0x218]
sub esp, 0x4a8
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], str._foo
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CreateDirectoryW]
sub esp, 8
mov dword [esp], esi
call dword [sym.imp.oleaut32.dll_SysAllocString]
mov edx, dword [0x448004]
mov dword [ebp - 0x454], eax
sub esp, 4
mov ecx, dword [edx]
mov dword [esp], edx
mov dword [esp + 8], edi
mov dword [esp + 4], eax
call dword [ecx + 0x54]
sub esp, 0xc
mov edi, eax
mov eax, 0x50a
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [ebp - 0x480], eax
call eax
mov eax, dword [ebp - 0x474]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x68]
sub esp, 8
mov edi, eax
mov eax, 0x50e
call fcn.00406da0
xor eax, eax
cmp edi, 0x80004003
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
xor eax, eax
nop
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x40eb90
cmp word [ebp - 0x218], 0
mov edx, ebx
je 0x40ebb9
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x40ebb0
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x41c334]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40ebc0
mov eax, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000000
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], ebx
mov dword [ebp - 0x478], eax
call eax
mov dword [ebp - 0x48c], eax
sub esp, 0x1c
xor eax, eax
nop
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x40ec20
cmp word [ebp - 0x218], 0
mov edx, ebx
je 0x40ec49
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x40ec40
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x41c32c]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40ec50
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000000
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], ebx
mov eax, dword [ebp - 0x478]
call eax
lea ecx, [ebp - 0x470]
mov dword [ebp - 0x490], eax
mov eax, dword [ebp - 0x474]
sub esp, 0x1c
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x68]
sub esp, 8
mov edi, eax
mov eax, 0x51a
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
lea edi, [ebp - 0x464]
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x470]
mov ecx, 0x51b
mov edx, 0x41c968
call fcn.004077e0
mov eax, dword [ebp - 0x474]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x470]
mov dword [ebp - 0x464], 0
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 8
mov dword [ebp - 0x47c], eax
mov eax, 0x520
call fcn.00406da0
mov edx, dword [ebp - 0x47c]
xor eax, eax
mov dword [esp + 4], str.Unexpected_hr__lx._n
test edx, edx
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x521
call fcn.00406da0
mov eax, dword [ebp - 0x464]
mov dword [esp + 4], str.Unexpected_value__lu._n
cmp eax, 2
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
xor eax, eax
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x40ed98
cmp word [ebp - 0x218], 0
mov edx, ebx
je 0x40edc1
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x40edb8
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x41c324]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40edc8
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000000
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov eax, dword [ebp - 0x478]
call eax
mov dword [ebp - 0x464], 0
mov dword [ebp - 0x494], eax
mov eax, dword [ebp - 0x470]
sub esp, 0x1c
mov edx, dword [eax]
mov dword [esp + 4], edi
lea edi, [ebp - 0x460]
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 8
mov ebx, eax
mov eax, 0x52b
call fcn.00406da0
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x52c
call fcn.00406da0
mov eax, dword [ebp - 0x464]
mov dword [esp + 4], str.Unexpected_value__lu._n
cmp eax, 3
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x470]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 8
mov ebx, eax
mov eax, 0x52f
call fcn.00406da0
xor eax, eax
cmp ebx, 0x80004003
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x470]
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x4232d8
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov ebx, eax
mov eax, 0x532
call fcn.00406da0
xor eax, eax
cmp ebx, 0x80004002
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov ebx, dword [ebp - 0x470]
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 4]
mov eax, dword [ebx]
sub esp, 4
mov dword [esp], ebx
call dword [eax + 8]
mov dword [ebp - 0x460], 0
mov ebx, eax
mov eax, dword [ebp - 0x470]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 8
mov edi, eax
mov eax, 0x539
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov edi, dword [ebp - 0x470]
mov eax, dword [edi]
mov dword [esp], edi
call dword [eax + 4]
mov eax, dword [edi]
sub esp, 4
mov dword [esp], edi
call dword [eax + 8]
sub esp, 4
mov edi, eax
mov eax, 0x53c
call fcn.00406da0
mov dword [esp + 0xc], ebx
add ebx, 1
xor eax, eax
cmp ebx, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_value__ld___ld._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x470]
mov dword [ebp - 0x45c], 0
lea ecx, [ebp - 0x45c]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 8
mov ebx, eax
mov eax, 0x540
call fcn.00406da0
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x541
call fcn.00406da0
mov edx, dword [ebp - 0x460]
mov eax, dword [ebp - 0x45c]
mov dword [esp + 4], str.got__p___p_n
cmp edx, eax
mov dword [esp + 8], eax
setne al
mov dword [esp + 0xc], edx
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x45c]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov ebx, dword [ebp - 0x470]
sub esp, 4
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 4]
mov eax, dword [ebx]
sub esp, 4
mov dword [esp], ebx
call dword [eax + 8]
lea ecx, [ebp - 0x468]
mov ebx, eax
mov eax, dword [ebp - 0x460]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x4232d8
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov edi, eax
mov eax, 0x547
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov edi, dword [ebp - 0x470]
mov eax, dword [edi]
mov dword [esp], edi
call dword [eax + 4]
mov eax, dword [edi]
sub esp, 4
mov dword [esp], edi
call dword [eax + 8]
sub esp, 4
mov edi, eax
mov eax, 0x549
call fcn.00406da0
xor eax, eax
cmp ebx, edi
mov dword [esp + 0xc], ebx
sete al
mov dword [esp + 8], edi
xor ebx, ebx
lea edi, [ebp - 0x450]
mov dword [esp], eax
mov dword [esp + 4], str.Unexpected_value__ld___ld._n
call fcn.004077c0
mov dword [esp], 0x54b
xor edx, edx
mov ecx, dword [ebp - 0x464]
mov eax, dword [ebp - 0x468]
call fcn.0040d690
mov dword [ebp - 0x488], 0
mov dword [ebp - 0x484], 0
mov dword [ebp - 0x47c], 0
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_VariantInit]
mov eax, dword [ebp - 0x468]
mov dword [ebp - 0x458], 0
lea ecx, [ebp - 0x458]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
mov dword [ebp - 0x478], eax
call fcn.00416600
mov edx, dword [ebp - 0x478]
mov dword [eax], 0x41b595
mov dword [eax + 4], 0x552
xor eax, eax
test edx, edx
sete al
mov dword [esp + 0xc], edx
mov dword [esp], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str._d:_Unexpected_hr__lx._n
call fcn.004077c0
call fcn.00416600
mov dword [eax], 0x41b595
mov dword [eax + 4], 0x553
mov eax, dword [ebp - 0x458]
mov dword [esp + 8], ebx
cmp eax, 1
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 4], str._d:_unexpected_value__lu._n
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
call fcn.00416600
mov dword [eax], 0x41b595
movzx edx, word [ebp - 0x450]
mov dword [eax + 4], 0x554
cmp dx, 9
mov dword [esp + 0xc], edx
sete al
mov dword [esp + 8], ebx
movzx eax, al
mov dword [esp + 4], str._d:_got_type__d_n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x448]
lea ecx, [ebp - 0x46c]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x41ca48
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
mov dword [ebp - 0x478], eax
call fcn.00416600
mov edx, dword [ebp - 0x478]
mov dword [eax], 0x41b595
mov dword [eax + 4], 0x557
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.Unexpected_hr__lx._n
call fcn.004077c0
mov eax, dword [ebp - 0x46c]
mov ecx, 0x558
mov edx, 0x41c978
call fcn.004077e0
mov eax, dword [ebp - 0x46c]
mov dword [ebp - 0x454], 0
lea ecx, [ebp - 0x454]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x20]
sub esp, 8
mov dword [ebp - 0x478], eax
call fcn.00416600
mov edx, dword [ebp - 0x478]
mov dword [eax], 0x41b595
mov dword [eax + 4], 0x55c
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.Unexpected_hr__lx._n
call fcn.004077c0
mov dword [esp + 4], 0x41c336
mov eax, dword [ebp - 0x454]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x40f708
add dword [ebp - 0x47c], 1
mov eax, dword [ebp - 0x454]
add ebx, 1
mov dword [esp], eax
mov eax, dword [ebp - 0x480]
call eax
mov eax, dword [ebp - 0x46c]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_VariantClear]
sub esp, 4
cmp ebx, 3
jne 0x40f152
mov eax, 0x56b
call fcn.00406da0
mov ebx, dword [ebp - 0x488]
mov dword [esp + 0x10], ebx
mov eax, dword [ebp - 0x484]
mov dword [esp + 0xc], eax
mov ecx, dword [ebp - 0x47c]
mov dword [esp + 4], str.each_file_should_be_found_1_time_instead_of__d__d__d_n
cmp ecx, 1
mov dword [esp + 8], ecx
sete dl
cmp eax, 1
sete al
and edx, eax
xor eax, eax
cmp ebx, 1
sete al
lea ebx, [ebp - 0x458]
and eax, edx
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], edi
call dword [sym.imp.oleaut32.dll_VariantInit]
mov eax, dword [ebp - 0x468]
mov dword [ebp - 0x458], 0xffffffff
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
lea edi, [ebp - 0x458]
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x10
mov ebx, eax
mov eax, 0x572
call fcn.00406da0
xor eax, eax
cmp ebx, 1
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x573
call fcn.00406da0
mov eax, dword [ebp - 0x458]
mov dword [esp + 4], str.Unexpected_value__lu._n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x468]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 4
mov ebx, eax
mov eax, 0x576
call fcn.00406da0
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x468]
mov edx, dword [eax]
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [edx + 0x10]
sub esp, 8
mov ebx, eax
mov eax, 0x578
call fcn.00406da0
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x468]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x10]
sub esp, 8
mov ebx, eax
mov eax, 0x57a
call fcn.00406da0
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
lea ebx, [ebp - 0x440]
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], ebx
call dword [sym.imp.oleaut32.dll_VariantInit]
lea edx, [ebp - 0x430]
sub esp, 4
mov dword [esp], edx
call dword [sym.imp.oleaut32.dll_VariantInit]
mov eax, dword [ebp - 0x468]
mov dword [ebp - 0x458], 1
sub esp, 4
mov ecx, dword [eax]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [ecx + 0xc]
sub esp, 0x10
mov edi, eax
mov eax, 0x580
call fcn.00406da0
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
lea edi, [ebp - 0x458]
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x581
call fcn.00406da0
mov eax, dword [ebp - 0x458]
mov dword [esp + 4], str.Unexpected_value__lu._n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x468]
mov dword [ebp - 0x458], 0
mov ecx, dword [eax]
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 2
mov dword [esp], eax
call dword [ecx + 0xc]
sub esp, 0x10
mov edi, eax
mov eax, 0x584
call fcn.00406da0
xor eax, eax
cmp edi, 1
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x585
call fcn.00406da0
mov eax, dword [ebp - 0x458]
mov dword [esp + 4], str.Unexpected_value__lu._n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov eax, 0x586
call fcn.00406da0
movzx ecx, word [ebp - 0x440]
mov dword [esp + 4], str.got_type__d_n
cmp cx, 9
mov dword [esp + 8], ecx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], ebx
call dword [sym.imp.oleaut32.dll_VariantClear]
lea edx, [ebp - 0x430]
sub esp, 4
mov dword [esp], edx
call dword [sym.imp.oleaut32.dll_VariantClear]
mov eax, dword [ebp - 0x468]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x460]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, dword [ebp - 0x48c]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x490]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x494]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_RemoveDirectoryW]
mov eax, dword [ebp - 0x470]
sub esp, 4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov dword [esp + 4], 0x41c32e
mov eax, dword [ebp - 0x454]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x40f738
add dword [ebp - 0x484], 1
jmp 0x40f337
mov dword [esp + 4], 0x41c326
mov eax, dword [ebp - 0x454]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x40f768
add dword [ebp - 0x488], 1
jmp 0x40f337
mov eax, 0x564
call fcn.00406da0
mov eax, dword [ebp - 0x454]
call fcn.00406fa0
mov dword [esp + 4], str.unexpected_file__s_was_found_n
mov dword [esp + 8], eax
mov dword [esp], 0
call fcn.004077c0
jmp 0x40f337