Function at 0x513040
Capabilities:
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x284]
sub esp, 0x284
push 0xffffffffffffffff
push 0x5c5f23
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x61f138]
xor eax, ebp
mov dword [ebp + 0x280], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x14], 0
xor eax, eax
mov dword [ebp - 0x20], edi
mov dword [ebp + 0x10], 0
mov dword [ebp + 0x14], 7
mov word [ebp], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
call fcn.0051e130
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x5130c9
mov esi, dword [esi]
call fcn.004387d0
push str.choose_folder_txt
push esi
mov ecx, eax
call fcn.00519610
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
mov ebx, eax
lea eax, [ebp + 0x78]
push eax
push ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea eax, [ebp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp + 0x78]
lea edx, [ecx + 2]
jmp 0x513110
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x513110
sub ecx, edx
lea eax, [ebp + 0x78]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp]
call fcn.00445cb0
lea eax, [ebp]
push eax
lea ecx, [ebp + 0x60]
call fcn.00441370
mov byte [ebp - 4], 1
test ebx, ebx
je 0x513977
sub esp, 8
lea ecx, [ebp - 0xfc]
call fcn.00442390
lea eax, [ebp + 0x60]
mov byte [ebp - 4], 2
push eax
mov edx, str.Picked_up_path:
lea ecx, [ebp + 0x48]
call fcn.00449ce0
add esp, 4
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x513179
mov eax, dword [eax]
push ecx
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.0044d4b0
mov byte [ebp - 4], 2
add esp, 4
mov edx, dword [ebp + 0x5c]
cmp edx, 8
jb 0x5131c8
mov ecx, dword [ebp + 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5131be
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51399c
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea eax, [ebp + 0x30]
push eax
lea ecx, [ebp - 0xe4]
call fcn.004466f0
mov dword [ebp - 0x14], 2
push 0x2d7
mov edx, str.path.cpp
mov byte [ebp - 4], 4
lea ecx, [ebp + 0x30]
call fcn.004c37b0
mov byte [ebp - 4], 2
add esp, 4
mov edx, dword [ebp + 0x44]
cmp edx, 8
jb 0x513235
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x51322b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139a1
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xfc]
mov byte [ebp - 4], 1
call fcn.0043ae30
mov eax, dword [ebp + 0x70]
cmp eax, 3
jbe 0x51377b
call fcn.00455e90
test al, al
je 0x51368e
push str.Windows_system32config_systemprofile_
lea ecx, [ebp + 0x48]
call fcn.00441310
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 7
call fcn.00513c00
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x18]
mov ecx, eax
call fcn.00513a00
push ecx
lea ecx, [ebp - 0xfc]
call fcn.00442390
push 0xc
mov byte [ebp - 4], 9
call fcn.0056eed3
mov esi, eax
add esp, 4
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 0xa
mov ebx, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
test esi, esi
je 0x5132dd
push str.Current_logged_on_USER:
mov dword [esi + 4], 0
mov dword [esi + 8], 1
call ebx
mov dword [esi], eax
test eax, eax
je 0x5139a6
jmp 0x5132df
xor esi, esi
mov byte [ebp - 4], 9
mov dword [ebp - 0x10], esi
test esi, esi
je 0x5139b0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 6
push eax
lea ecx, [ebp - 0x10]
call fcn.0050fc00
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x51331b
mov eax, dword [esi + 4]
test eax, eax
jne 0x51331d
push dword [esi]
call fcn.005b38c0
mov dword [esi + 4], eax
jmp 0x51331d
xor eax, eax
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.00449e10
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 8
call fcn.0050fd70
lea eax, [ebp + 0x18]
push eax
lea ecx, [ebp - 0xe4]
call fcn.004466f0
mov dword [ebp - 0x14], 0xa
push 0x2e2
mov edx, str.path.cpp
mov byte [ebp - 4], 0xb
lea ecx, [ebp + 0x18]
call fcn.004c37b0
mov byte [ebp - 4], 8
add esp, 4
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x5133a3
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x513399
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139ba
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xfc]
mov byte [ebp - 4], 7
call fcn.0043ae30
push 0x5f210c
lea ecx, [ebp - 0x28]
call fcn.0050f9d0
push 0xc
mov byte [ebp - 4], 0xd
call fcn.0056eed3
mov esi, eax
add esp, 4
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 0xe
test esi, esi
je 0x5133fb
push str.Users_
mov dword [esi + 4], 0
mov dword [esi + 8], 1
call ebx
mov dword [esi], eax
test eax, eax
je 0x5139bf
jmp 0x5133fd
xor esi, esi
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x5139c9
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x1a
push eax
lea ecx, [ebp - 0x1c]
call fcn.0050fc00
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x513437
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x14], 0x3a
push eax
lea ecx, [ebp - 0x10]
call fcn.0050fc00
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x513455
mov eax, dword [eax]
jmp 0x513457
xor eax, eax
push eax
lea ecx, [ebp + 0x30]
call fcn.00441310
lea ecx, [ebp - 0x10]
call fcn.0050fd70
lea ecx, [ebp - 0x1c]
call fcn.0050fd70
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0x13
call fcn.0050fd70
lea eax, [ebp + 0x30]
push eax
lea edx, [ebp + 0x48]
lea ecx, [ebp + 0x60]
call fcn.005143e0
push ecx
lea ecx, [ebp - 0xfc]
call fcn.00442390
lea eax, [ebp + 0x60]
mov byte [ebp - 4], 0x14
push eax
mov edx, str.Final_path:
lea ecx, [ebp + 0x18]
call fcn.00449ce0
add esp, 4
mov byte [ebp - 4], 0x15
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x5134be
mov eax, dword [eax]
push ecx
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.0044d4b0
mov byte [ebp - 4], 0x14
add esp, 4
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x51350d
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x513503
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139d3
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea eax, [ebp + 0x18]
push eax
lea ecx, [ebp - 0xe4]
call fcn.004466f0
push 0x2e7
mov edx, str.path.cpp
mov byte [ebp - 4], 0x16
lea ecx, [ebp + 0x18]
call fcn.004c37b0
mov byte [ebp - 4], 0x14
add esp, 4
mov edx, dword [ebp + 0x2c]
cmp edx, 8
jb 0x513573
mov ecx, dword [ebp + 0x18]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x513569
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139d8
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xfc]
call fcn.0043ae30
mov byte [ebp - 4], 7
mov edx, dword [ebp + 0x44]
cmp edx, 8
jb 0x5135bc
mov ecx, dword [ebp + 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5135b2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139dd
push edx
push ecx
call fcn.0056eec5
add esp, 8
xor eax, eax
mov dword [ebp + 0x40], 0
lea ecx, [ebp - 0x2c]
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
call fcn.0050fd70
lea ecx, [ebp - 0x18]
call fcn.0050fd70
mov byte [ebp - 4], 1
mov edx, dword [ebp + 0x5c]
cmp edx, 8
jb 0x51361e
mov ecx, dword [ebp + 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x513614
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139e2
push edx
push ecx
call fcn.0056eec5
add esp, 8
mov ebx, dword [ebp - 0x20]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
js 0x513649
mov eax, dword [ebp - 0x24]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push 1
push 0x5f210c
lea ecx, [ebp + 0x60]
call fcn.00448340
mov eax, dword [ebp + 0x60]
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi], eax
mov eax, dword [ebp + 0x64]
mov dword [edi + 4], eax
mov eax, dword [ebp + 0x68]
mov dword [edi + 8], eax
mov eax, dword [ebp + 0x6c]
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 0x70]
mov dword [edi + 0x10], eax
mov eax, dword [ebp + 0x74]
mov dword [edi + 0x14], eax
jmp 0x51393a
sub esp, 8
lea ecx, [ebp - 0xfc]
call fcn.00442390
lea eax, [ebp + 0x60]
mov byte [ebp - 4], 0x17
push eax
mov edx, str.Final_path:
lea ecx, [ebp + 0x48]
call fcn.00449ce0
add esp, 4
mov byte [ebp - 4], 0x18
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x5136c3
mov eax, dword [eax]
push ecx
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.0044d4b0
mov byte [ebp - 4], 0x17
add esp, 4
mov edx, dword [ebp + 0x5c]
cmp edx, 8
jb 0x513712
mov ecx, dword [ebp + 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x513708
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139e7
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea eax, [ebp + 0x48]
push eax
lea ecx, [ebp - 0xe4]
call fcn.004466f0
push 0x2ed
mov edx, str.path.cpp
mov byte [ebp - 4], 0x19
lea ecx, [ebp + 0x48]
call fcn.004c37b0
add esp, 4
mov byte [ebp - 4], 0x17
mov edx, dword [ebp + 0x5c]
cmp edx, 8
jb 0x513843
mov ecx, dword [ebp + 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x513839
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139ec
jmp 0x513839
cmp eax, 2
jne 0x513857
sub esp, 8
lea ecx, [ebp - 0xfc]
call fcn.00442390
lea eax, [ebp + 0x60]
mov byte [ebp - 4], 0x1a
push eax
mov edx, str.Final_path:
lea ecx, [ebp + 0x48]
call fcn.00449ce0
add esp, 4
mov byte [ebp - 4], 0x1b
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x5137b9
mov eax, dword [eax]
push ecx
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.0044d4b0
mov byte [ebp - 4], 0x1a
add esp, 4
mov edx, dword [ebp + 0x5c]
cmp edx, 8
jb 0x513808
mov ecx, dword [ebp + 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5137fe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139f1
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea eax, [ebp + 0x48]
push eax
lea ecx, [ebp - 0xe4]
call fcn.004466f0
push 0x2f2
mov edx, str.path.cpp
mov byte [ebp - 4], 0x1c
lea ecx, [ebp + 0x48]
call fcn.004c37b0
add esp, 4
mov byte [ebp - 4], 0x1a
jmp 0x51373e
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xfc]
mov byte [ebp - 4], 1
call fcn.0043ae30
jmp 0x513621
jae 0x513621
sub esp, 8
lea ecx, [ebp - 0xfc]
call fcn.00442390
mov edx, str.Final_path:_empty
mov byte [ebp - 4], 0x1d
lea ecx, [ebp - 0xec]
call fcn.0044a500
lea eax, [ebp + 0x48]
push eax
lea ecx, [ebp - 0xe4]
call fcn.004466f0
push 0x2fc
mov edx, str.path.cpp
mov byte [ebp - 4], 0x1e
lea ecx, [ebp + 0x48]
call fcn.004c37b0
mov byte [ebp - 4], 0x1d
add esp, 4
mov edx, dword [ebp + 0x5c]
cmp edx, 8
jb 0x5138e5
mov ecx, dword [ebp + 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5138db
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139ec
push edx
push ecx
call fcn.0056eec5
add esp, 8
lea ecx, [ebp - 0xfc]
mov byte [ebp - 4], 1
call fcn.0043ae30
push 0x5e1af8
mov ecx, edi
call fcn.00441310
mov edx, dword [ebp + 0x74]
cmp edx, 8
jb 0x51393a
mov ecx, dword [ebp + 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x513930
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5139ec
push edx
push ecx
call fcn.0056eec5
add esp, 8
xor eax, eax
mov dword [ebp + 0x74], 7
lea ecx, [ebp]
mov dword [ebp + 0x70], eax
mov word [ebp + 0x60], ax
call fcn.00445c30
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x280]
xor ecx, ebp
call fcn.0056eeb4
lea esp, [ebp + 0x284]
pop ebp
ret
xor eax, eax
mov dword [edi + 0x10], 0
push eax
mov dword [edi + 0x14], 7
mov ecx, edi
push 0x5e1af8
mov word [edi], ax
call fcn.00445cb0
jmp 0x513900
call fcn.00591dc6
call fcn.00591dc6
push 0x8007000e
call fcn.005b38a0
push 0x8007000e
call fcn.005b38a0
call fcn.00591dc6
push 0x8007000e
call fcn.005b38a0
push 0x8007000e
call fcn.005b38a0
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
call fcn.00591dc6
int3