Function at 0x402080
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ae8d
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x40f00c]
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 ebx, edx
mov dword [ebp - 0x26c], ebx
mov edi, ecx
mov eax, dword [ebp + 0x38]
mov dword [ebp - 0x268], eax
mov dword [ebp - 4], 1
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
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 - 0x230]
push 0
mov dword [ebp - 0x230], 0
push 0x40c398
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
call fcn.00408c40
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x218]
push 0
mov dword [ebp - 0x218], 0
push 0x40c398
mov dword [ebp - 0x208], 0
mov dword [ebp - 0x204], 0xf
mov byte [ebp - 0x218], 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 - 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
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 - 0x1b8]
lea ecx, [ebp + 8]
call fcn.004062b0
add esp, 0x20
lea eax, [ebp - 0x200]
push eax
sub esp, 0x18
lea eax, [ebp - 0x1b8]
mov ecx, esp
lea esi, [ebp - 0x218]
push eax
call fcn.00408a10
mov edx, esi
lea ecx, [ebp - 0x1d0]
call fcn.00404d70
add esp, 0x1c
lea eax, [ebp - 0x200]
lea esi, [ebp - 0x1e8]
push eax
sub esp, 0x18
lea eax, [ebp - 0x1d0]
mov ecx, esp
push eax
call fcn.00408a10
mov edx, esi
lea ecx, [ebp - 0x1d0]
call fcn.00404d70
add esp, 0x1c
lea eax, [ebp - 0x1b8]
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 - 0x260]
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 0x402929
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x270]
cmp edx, 0x10
jb 0x40234c
mov ecx, dword [ebp - 0x284]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402342
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402955
push edx
push ecx
call fcn.0040a1f6
add esp, 8
cmp byte [0x40f021], 0
je 0x40238c
cmp dword [ebp - 0x1a4], 0x10
lea ecx, [ebp - 0x1b8]
lea eax, [ebp - 0x1e8]
cmovae ecx, dword [ebp - 0x1b8]
cmp dword [ebp - 0x1d4], 0x10
push ecx
cmovae eax, dword [ebp - 0x1e8]
push eax
push str.target__o__s__s__r_n
call fcn.00401420
add esp, 0xc
mov esi, dword [edi + 0x14]
mov eax, esi
mov ecx, dword [edi + 0x10]
sub eax, ecx
cmp eax, 4
jb 0x4023b9
lea eax, [ecx + 4]
mov edx, edi
mov dword [edi + 0x10], eax
cmp esi, 0x10
jb 0x4023aa
mov edx, dword [edi]
mov eax, dword [str.__o]
mov dword [edx + ecx], eax
mov byte [edx + ecx + 4], 0
jmp 0x4023d6
push 4
push str.__o
mov byte [ebp - 0x264], 0
mov ecx, edi
push dword [ebp - 0x264]
push 4
call fcn.00409560
cmp dword [ebp - 0x1d4], 0x10
lea ecx, [ebp - 0x1e8]
mov esi, dword [edi + 0x14]
mov eax, esi
cmovae ecx, dword [ebp - 0x1e8]
mov edx, dword [edi + 0x10]
sub eax, edx
mov ebx, dword [ebp - 0x1d8]
cmp ebx, eax
ja 0x402421
lea eax, [ebx + edx]
mov dword [edi + 0x10], eax
mov eax, edi
cmp esi, 0x10
jb 0x40240d
mov eax, dword [edi]
push ebx
lea esi, [eax + edx]
push ecx
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [ebx + esi], 0
jmp 0x402438
push ebx
push ecx
mov byte [ebp - 0x264], 0
mov ecx, edi
push dword [ebp - 0x264]
push ebx
call fcn.00409560
mov esi, dword [edi + 0x14]
mov eax, esi
mov ecx, dword [edi + 0x10]
sub eax, ecx
cmp eax, 1
jb 0x402465
lea eax, [ecx + 1]
mov edx, edi
mov dword [edi + 0x10], eax
cmp esi, 0x10
jb 0x402456
mov edx, dword [edi]
mov al, byte [0x40c460]
mov byte [edx + ecx], al
mov byte [edx + ecx + 1], 0
jmp 0x402482
push 1
push 0x40c460
mov byte [ebp - 0x264], 0
mov ecx, edi
push dword [ebp - 0x264]
push 1
call fcn.00409560
cmp dword [ebp - 0x1a4], 0x10
lea ecx, [ebp - 0x1b8]
mov esi, dword [edi + 0x14]
mov eax, esi
cmovae ecx, dword [ebp - 0x1b8]
mov edx, dword [edi + 0x10]
sub eax, edx
mov ebx, dword [ebp - 0x1a8]
cmp ebx, eax
ja 0x4024cd
lea eax, [edx + ebx]
mov dword [edi + 0x10], eax
mov eax, edi
cmp esi, 0x10
jb 0x4024b9
mov eax, dword [edi]
push ebx
lea esi, [eax + edx]
push ecx
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [ebx + esi], 0
jmp 0x4024e4
push ebx
push ecx
mov byte [ebp - 0x264], 0
mov ecx, edi
push dword [ebp - 0x264]
push ebx
call fcn.00409560
mov esi, dword [edi + 0x14]
mov eax, esi
mov ecx, dword [edi + 0x10]
sub eax, ecx
cmp eax, 1
jb 0x402511
lea eax, [ecx + 1]
mov edx, edi
mov dword [edi + 0x10], eax
cmp esi, 0x10
jb 0x402502
mov edx, dword [edi]
mov al, byte [0x40c460]
mov byte [edx + ecx], al
mov byte [edx + ecx + 1], 0
jmp 0x40252e
push 1
push 0x40c460
mov byte [ebp - 0x264], 0
mov ecx, edi
push dword [ebp - 0x264]
push 1
call fcn.00409560
mov ecx, dword [ebp - 0x268]
mov eax, 0x7fffffff
mov edx, dword [ecx + 0x10]
sub eax, edx
cmp eax, 1
jb 0x402be0
cmp dword [ecx + 0x14], 0x10
jb 0x40254f
mov ecx, dword [ecx]
push 1
push 0x40c460
push edx
push ecx
push ecx
push dword [ebp - 0x26c]
lea ecx, [ebp - 0x284]
call fcn.00409930
mov byte [ebp - 4], 9
lea edx, [ebp - 0x284]
cmp dword [ebp - 0x270], 0x10
mov ebx, dword [ebp - 0x284]
mov eax, dword [edi + 0x14]
cmovae edx, ebx
mov esi, dword [edi + 0x10]
sub eax, esi
mov ecx, dword [ebp - 0x274]
cmp ecx, eax
ja 0x4025bd
cmp dword [edi + 0x14], 0x10
lea eax, [esi + ecx]
mov dword [edi + 0x10], eax
jb 0x4025a4
mov edi, dword [edi]
push ecx
push edx
add esi, edi
push esi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x274]
add esp, 0xc
mov byte [eax + esi], 0
jmp 0x4025da
push ecx
push edx
mov byte [ebp - 0x268], 0
push dword [ebp - 0x268]
push ecx
mov ecx, edi
call fcn.00409560
mov ebx, dword [ebp - 0x284]
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x270]
cmp eax, 0x10
jb 0x402614
lea ecx, [eax + 1]
mov eax, ebx
cmp ecx, 0x1000
jb 0x40260a
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push ecx
push ebx
call fcn.0040a1f6
add esp, 8
push 0
sub esp, 0x18
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 0
lea edx, [ebp - 0x1b8]
lea ecx, [ebp + 8]
call fcn.004062b0
add esp, 0x20
lea eax, [ebp - 0x200]
lea esi, [ebp - 0x218]
lea edi, [ebp - 0x1d0]
push eax
sub esp, 0x18
lea eax, [ebp - 0x1b8]
mov ecx, esp
push eax
call fcn.00408a10
mov edx, esi
mov ecx, edi
call fcn.00404d70
add esp, 0x1c
lea eax, [ebp - 0x200]
push eax
sub esp, 0x18
mov eax, edi
mov ecx, esp
push eax
call fcn.00408a10
mov edx, esi
mov ecx, edi
call fcn.00404d70
mov eax, dword [ebp - 0x26c]
add esp, 0x1c
cmp byte [eax], 0
jne 0x4026f9
lea eax, [ebp - 0x1a0]
push eax
push 0xc8
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp - 0x1bc], 0x10
lea ecx, [ebp - 0x388]
mov eax, edi
cmovae eax, dword [ebp - 0x1d0]
push eax
call fcn.004087d0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [ebp - 0x388]
lea ecx, [ebp - 0x384]
cmp eax, ecx
je 0x4026f9
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov edx, dword [ebp - 0x1ec]
cmp edx, 0x10
jb 0x402733
mov ecx, dword [ebp - 0x200]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402729
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1bc]
cmp edx, 0x10
jb 0x40276d
mov ecx, dword [ebp - 0x1d0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402763
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x204]
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x1bc], 0xf
mov byte [ebp - 0x1d0], 0
cmp edx, 0x10
jb 0x4027c2
mov ecx, dword [ebp - 0x218]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4027b8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x21c]
cmp edx, 0x10
jb 0x4027fc
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4027f2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1d4]
cmp edx, 0x10
jb 0x402836
mov ecx, dword [ebp - 0x1e8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40282c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1a4]
mov dword [ebp - 0x1d8], 0
mov dword [ebp - 0x1d4], 0xf
mov byte [ebp - 0x1e8], 0
cmp edx, 0x10
jb 0x40288b
mov ecx, dword [ebp - 0x1b8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402881
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0xf
mov byte [ebp - 0x1b8], 0
cmp edx, 0x10
jb 0x4028da
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4028d0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
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 0x402bc4
mov ecx, dword [ebp + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40291a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
jmp 0x402bc4
mov edx, dword [ebp - 0x270]
cmp edx, 0x10
jb 0x402965
mov ecx, dword [ebp - 0x284]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40295b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40295b
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]
mov byte [ebx], 1
cmovae eax, dword [ebp - 0x1b8]
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 edx, dword [ebp - 0x1ec]
cmp edx, 0x10
jb 0x4029d4
mov ecx, dword [ebp - 0x200]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4029ca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1bc]
cmp edx, 0x10
jb 0x402a0e
mov ecx, dword [ebp - 0x1d0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402a04
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x204]
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x1bc], 0xf
mov byte [ebp - 0x1d0], 0
cmp edx, 0x10
jb 0x402a63
mov ecx, dword [ebp - 0x218]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402a59
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x21c]
cmp edx, 0x10
jb 0x402a9d
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402a93
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1d4]
cmp edx, 0x10
jb 0x402ad7
mov ecx, dword [ebp - 0x1e8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402acd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp - 0x1a4]
mov dword [ebp - 0x1d8], 0
mov dword [ebp - 0x1d4], 0xf
mov byte [ebp - 0x1e8], 0
cmp edx, 0x10
jb 0x402b2c
mov ecx, dword [ebp - 0x1b8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402b22
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
push edx
push ecx
call fcn.0040a1f6
add esp, 8
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a4], 0xf
mov byte [ebp - 0x1b8], 0
cmp edx, 0x10
jb 0x402b77
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402b6d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402baf
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 0x402bbf
mov ecx, dword [ebp + 0x20]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402bb5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402bb5
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, 1
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.00409d8d
mov esp, ebp
pop ebp
ret
call fcn.004015b0
int3