Function at 0x401640
Capabilities:
Delete file
Execute command
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ade8
mov eax, dword fs:[0]
push eax
sub esp, 0x38c
mov eax, dword [0x40f00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x264], esi
mov edi, ecx
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x200]
push 0
mov dword [ebp - 0x200], 0
push 0x40c398
mov dword [ebp - 0x1f0], 0
mov dword [ebp - 0x1ec], 0xf
mov byte [ebp - 0x200], 0
call fcn.00408c40
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1e8]
push 0
mov dword [ebp - 0x1e8], 0
push 0x40c398
mov dword [ebp - 0x1d8], 0
mov dword [ebp - 0x1d4], 0xf
mov byte [ebp - 0x1e8], 0
call fcn.00408c40
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x260]
push 0
mov dword [ebp - 0x260], 0
push 0x40c398
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0xf
mov byte [ebp - 0x260], 0
call fcn.00408c40
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x248]
push 0
mov dword [ebp - 0x248], 0
push 0x40c398
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0xf
mov byte [ebp - 0x248], 0
call fcn.00408c40
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1d0]
push 0
mov dword [ebp - 0x1d0], 0
push 0x40c398
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x1bc], 0xf
mov byte [ebp - 0x1d0], 0
call fcn.00408c40
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x1b8]
push 0
mov dword [ebp - 0x1b8], 0
push 0x40c398
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0xf
mov byte [ebp - 0x1b8], 0
call fcn.00408c40
push 0
sub esp, 0x18
mov byte [ebp - 4], 7
mov ecx, esp
push 1
push 0x40c39c
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.00408c40
push 1
lea edx, [ebp - 0x200]
lea ecx, [ebp + 8]
call fcn.004062b0
add esp, 0x20
lea eax, [ebp - 0x1b8]
push eax
sub esp, 0x18
mov ecx, esp
lea eax, [ebp - 0x200]
push eax
call fcn.00408a10
lea edx, [ebp - 0x248]
lea ecx, [ebp - 0x1d0]
call fcn.00404d70
add esp, 0x1c
lea eax, [ebp - 0x1b8]
push eax
sub esp, 0x18
lea eax, [ebp - 0x1d0]
mov ecx, esp
push eax
call fcn.00408a10
lea edx, [ebp - 0x1e8]
lea ecx, [ebp - 0x1d0]
call fcn.00404d70
add esp, 0x1c
lea eax, [ebp - 0x200]
lea ecx, [ebp - 0x284]
push eax
call fcn.00408a10
lea ecx, [ebp - 0x284]
mov byte [ebp - 4], 8
call fcn.00404940
cmp dword [ebp - 0x270], 0x10
lea ecx, [ebp - 0x230]
lea eax, [ebp - 0x284]
cmovae eax, dword [ebp - 0x284]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
jne 0x401db3
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x270]
cmp edx, 0x10
jb 0x4018fe
mov ecx, dword [ebp - 0x284]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4018f4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401ddf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov ecx, dword [ebp - 0x1c0]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 1
jb 0x40206d
cmp dword [ebp - 0x1bc], 0x10
lea eax, [ebp - 0x1d0]
push 1
cmovae eax, dword [ebp - 0x1d0]
push 0x40c3cc
push ecx
push eax
push ecx
push dword [ebp - 0x264]
lea ecx, [ebp - 0x284]
call fcn.00409930
mov byte [ebp - 4], 9
lea edx, [ebp - 0x1e8]
cmp dword [ebp - 0x1d4], 0x10
mov eax, dword [ebp - 0x270]
cmovae edx, dword [ebp - 0x1e8]
mov esi, dword [ebp - 0x274]
sub eax, esi
mov ecx, dword [ebp - 0x1d8]
push ecx
push edx
cmp ecx, eax
ja 0x4019af
cmp dword [ebp - 0x270], 0x10
lea eax, [ecx + esi]
mov dword [ebp - 0x274], eax
lea eax, [ebp - 0x284]
cmovae eax, dword [ebp - 0x284]
add esi, eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x1d8]
add esp, 0xc
mov byte [esi + eax], 0
lea eax, [ebp - 0x284]
jmp 0x4019c8
mov byte [ebp - 0x268], 0
push dword [ebp - 0x268]
push ecx
lea ecx, [ebp - 0x284]
call fcn.00409560
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x208], 0
mov dword [ebp - 0x204], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x218], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x208], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x218]
mov esi, dword [ebp - 0x204]
mov eax, esi
mov edx, dword [ebp - 0x208]
sub eax, edx
cmp eax, 4
jb 0x401a55
cmp esi, 0x10
lea eax, [edx + 4]
mov dword [ebp - 0x208], eax
cmovae ecx, dword [ebp - 0x218]
mov eax, dword [str..exe]
mov dword [ecx + edx], eax
lea eax, [ebp - 0x218]
mov byte [ecx + edx + 4], 0
jmp 0x401a70
push 4
push str..exe
mov byte [ebp - 0x268], 0
push dword [ebp - 0x268]
push 4
call fcn.00409560
movups xmm0, xmmword [eax]
movq xmm1, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov edx, dword [ebp - 0x1a4]
movq qword [ebp - 0x26c], xmm1
movups xmmword [ebp - 0x294], xmm0
cmp edx, 0x10
jb 0x401ae1
mov ecx, dword [ebp - 0x1b8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401ac8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401b75
push edx
push ecx
call fcn.0040a1f6
movups xmm0, xmmword [ebp - 0x294]
add esp, 8
movq xmm1, qword [ebp - 0x26c]
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x204]
movq qword [ebp - 0x1a8], xmm1
movups xmmword [ebp - 0x1b8], xmm0
cmp edx, 0x10
jb 0x401b2a
mov ecx, dword [ebp - 0x218]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401b20
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401b75
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x270]
mov dword [ebp - 0x208], 0
mov dword [ebp - 0x204], 0xf
mov byte [ebp - 0x218], 0
cmp edx, 0x10
jb 0x401b85
mov ecx, dword [ebp - 0x284]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401b7b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401b7b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040a1f6
add esp, 8
cmp byte [0x40f021], 0
je 0x401bcf
cmp dword [ebp - 0x1bc], 0x10
lea eax, [ebp - 0x1d0]
cmovae eax, dword [ebp - 0x1d0]
push eax
push str.default_dir:__s_r_n
call fcn.00401420
cmp dword [ebp - 0x1a4], 0x10
lea eax, [ebp - 0x1b8]
cmovae eax, dword [ebp - 0x1b8]
push eax
push str.app__s__r_n
call fcn.00401420
add esp, 0x10
lea eax, [ebp - 0x1a0]
push eax
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp - 0x1bc], 0x10
lea eax, [ebp - 0x1d0]
lea ecx, [ebp - 0x398]
cmovae eax, dword [ebp - 0x1d0]
push eax
call fcn.004087d0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp - 0x398]
lea ecx, [ebp - 0x394]
cmp eax, ecx
je 0x401c23
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp - 0x264]
cmp byte [eax], 0
je 0x401c40
push str._r_nERRORS._r_n
call fcn.00401420
add esp, 4
jmp 0x401e24
cmp dword [ebp - 0x1a4], 0x10
lea eax, [ebp - 0x1b8]
cmovae eax, dword [ebp - 0x1b8]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
cmp byte [0x40f674], 0
je 0x401cbb
mov edx, dword [edi + 0x14]
mov eax, edx
mov ecx, dword [edi + 0x10]
sub eax, ecx
cmp eax, 9
jb 0x401c9e
lea eax, [ecx + 9]
mov dword [edi + 0x10], eax
mov eax, edi
cmp edx, 0x10
jb 0x401c85
mov eax, dword [edi]
push 9
lea esi, [eax + ecx]
push str.__lstdc
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 9], 0
jmp 0x401cbb
push 9
push str.__lstdc
mov byte [ebp - 0x264], 0
mov ecx, edi
push dword [ebp - 0x264]
push 9
call fcn.00409560
push str._r_ncompiling..._r_n
call fcn.00401420
add esp, 4
cmp dword [edi + 0x14], 0x10
jb 0x401cd0
mov edi, dword [edi]
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
push edi
call esi
add esp, 4
test eax, eax
je 0x401cf2
push str._r_ngcc_ERRORS._r_n
call fcn.00401420
add esp, 4
jmp 0x401e24
mov ecx, dword [ebp - 0x1d8]
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, 4
jb 0x402072
cmp dword [ebp - 0x1d4], 0x10
lea eax, [ebp - 0x1e8]
push 4
cmovae eax, dword [ebp - 0x1e8]
push str..exe
push ecx
push eax
push ecx
push dword [ebp - 0x264]
lea ecx, [ebp - 0x284]
call fcn.00409930
cmp dword [ebp - 0x270], 0x10
lea eax, [ebp - 0x284]
cmovae eax, dword [ebp - 0x284]
push eax
push str.running_app___s__r_n_r_n
call fcn.00401420
mov edx, dword [ebp - 0x270]
add esp, 8
cmp edx, 0x10
jb 0x401d95
mov ecx, dword [ebp - 0x284]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401d8b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401d8b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040a1f6
add esp, 8
cmp dword [ebp - 0x1a4], 0x10
lea eax, [ebp - 0x1b8]
cmovae eax, dword [ebp - 0x1b8]
push eax
call esi
add esp, 4
mov edi, eax
jmp 0x401e29
mov edx, dword [ebp - 0x270]
cmp edx, 0x10
jb 0x401def
mov ecx, dword [ebp - 0x284]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401de5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401de5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040a1f6
add esp, 8
cmp dword [ebp - 0x1ec], 0x10
lea eax, [ebp - 0x200]
mov byte [esi], 1
cmovae eax, dword [ebp - 0x200]
push eax
push str.bad_target___s__r_n
call fcn.00401420
push str.press_any_key
call fcn.00401420
add esp, 0xc
call dword [sym.imp.api_ms_win_crt_conio_l1_1_0.dll__getch]
mov edi, 1
mov edx, dword [ebp - 0x1a4]
mov esi, dword [ebp - 0x1e8]
cmp edx, 0x10
jb 0x401e69
mov ecx, dword [ebp - 0x1b8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401e5f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402040
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1bc]
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0xf
mov byte [ebp - 0x1b8], 0
cmp edx, 0x10
jb 0x401ebe
mov ecx, dword [ebp - 0x1d0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401eb4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402040
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x234]
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x1bc], 0xf
mov byte [ebp - 0x1d0], 0
cmp edx, 0x10
jb 0x401f13
mov ecx, dword [ebp - 0x248]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401f09
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402040
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x24c]
cmp edx, 0x10
jb 0x401f4d
mov ecx, dword [ebp - 0x260]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401f43
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402040
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov eax, dword [ebp - 0x1d4]
cmp eax, 0x10
jb 0x401f83
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x401f79
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402040
push ecx
push esi
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1ec]
cmp edx, 0x10
jb 0x401fbd
mov ecx, dword [ebp - 0x200]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401fb3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402040
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x1f0], 0
mov dword [ebp - 0x1ec], 0xf
mov byte [ebp - 0x200], 0
cmp edx, 0x10
jb 0x402008
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401ffe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402040
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp + 0x34]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0xf
mov byte [ebp + 8], 0
cmp edx, 0x10
jb 0x402050
mov ecx, dword [ebp + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402046
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402046
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409d8d
mov esp, ebp
pop ebp
ret
call fcn.004015b0
call fcn.004015b0
int3