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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47226a
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
mov eax, dword [0x48f840]
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 dword [ebp - 4], 1
lea edx, [ebp - 0x260]
mov eax, dword [0x496454]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
lea ecx, [ebp + 8]
call fcn.00402020
mov edx, eax
mov dword [ebp - 0x298], 7
xor eax, eax
mov dword [ebp - 0x29c], 0
mov word [ebp - 0x2ac], ax
cmp word [edx], ax
jne 0x40a807
xor ecx, ecx
jmp 0x40a81f
mov ecx, edx
lea esi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a810
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x2ac]
call fcn.00402ec0
lea eax, [ebp - 0x2ac]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x2c4]
push eax
call fcn.0040c7b0
mov edx, eax
mov byte [ebp - 4], 3
cmp dword [edx + 0x14], 0x10
jb 0x40a851
mov edx, dword [edx]
mov eax, dword [ebp - 0x260]
push 0
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
cmp dword [ebp - 0x2b0], 0x10
mov ebx, eax
mov dword [ebp - 0x294], ebx
jb 0x40a87f
push dword [ebp - 0x2c4]
call fcn.0043d771
add esp, 4
mov byte [ebp - 4], 1
cmp dword [ebp - 0x298], 8
mov dword [ebp - 0x2b0], 0xf
mov dword [ebp - 0x2b4], 0
mov byte [ebp - 0x2c4], 0
jb 0x40a8b5
push dword [ebp - 0x2ac]
call fcn.0043d771
add esp, 4
xor eax, eax
mov dword [ebp - 0x298], 7
mov dword [ebp - 0x29c], 0
mov word [ebp - 0x2ac], ax
test ebx, ebx
je 0x40adb9
mov eax, dword [ebp - 0x260]
push 0
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
test eax, eax
je 0x40adb9
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push dword [ebp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call esi
push 0x2c
lea eax, [ebp - 0x25c]
push 0
push eax
call fcn.00446bf0
add esp, 0xc
lea ecx, [ebp - 0x25c]
push 0
push 0
call fcn.00401210
lea ecx, [ebp - 0x25c]
mov byte [ebp - 4], 4
call fcn.004013e0
lea eax, [ebp - 0x218]
push eax
call esi
lea ecx, [ebp - 0x25c]
call fcn.004016d0
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
movq qword [ebp - 0x230], xmm0
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x230], 0x4963d0
movq qword [ebp - 0x224], xmm0
mov edi, 0x4963d0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x224], edi
lea eax, [ebp - 0x230]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x25c]
call fcn.00401710
test eax, eax
je 0x40ad3f
cmp eax, 1
jne 0x40ad1f
mov eax, dword [ebp - 0x230]
mov ecx, 0x47e940
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40aa16
test dx, dx
je 0x40aa12
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40aa16
add eax, 4
add ecx, 4
test dx, dx
jne 0x40a9f0
xor eax, eax
jmp 0x40aa1b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40ad1f
push 0x47f020
lea ecx, [ebp - 0x2d0]
call fcn.00401c70
lea eax, [ebp - 0x2d0]
mov byte [ebp - 4], 7
push eax
lea edx, [ebp + 0x14]
lea ecx, [ebp - 0x2dc]
call fcn.00401f10
add esp, 4
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 8
push ecx
mov edx, eax
lea ecx, [ebp - 0x2e8]
call fcn.00401f10
add esp, 4
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x224]
push dword [eax]
push dword [eax + 4]
call fcn.00401d10
mov eax, dword [ebp - 0x2e8]
cmp eax, 0x4963d0
je 0x40aa94
push eax
call fcn.0043d952
add esp, 4
mov eax, dword [ebp - 0x2dc]
cmp eax, 0x4963d0
je 0x40aaaa
push eax
call fcn.0043d952
add esp, 4
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x2d0]
cmp eax, 0x4963d0
je 0x40aac4
push eax
call fcn.0043d952
add esp, 4
lea ecx, [ebp - 0x224]
call fcn.00402020
mov edx, eax
mov dword [ebp - 0x264], 7
xor eax, eax
mov dword [ebp - 0x268], 0
mov word [ebp - 0x278], ax
cmp word [edx], ax
jne 0x40aaf7
xor ecx, ecx
jmp 0x40ab0f
mov ecx, edx
lea esi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ab00
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x278]
call fcn.00402ec0
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x290]
push eax
call fcn.0040c7b0
mov edx, eax
mov byte [ebp - 4], 0xb
cmp dword [edx + 0x14], 0x10
jb 0x40ab41
mov edx, dword [edx]
mov eax, dword [ebp - 0x260]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
cmp dword [ebp - 0x27c], 0x10
mov esi, eax
jb 0x40ab67
push dword [ebp - 0x290]
call fcn.0043d771
add esp, 4
mov byte [ebp - 4], 6
cmp dword [ebp - 0x264], 8
mov dword [ebp - 0x27c], 0xf
mov dword [ebp - 0x280], 0
mov byte [ebp - 0x290], 0
jb 0x40ab9d
push dword [ebp - 0x278]
call fcn.0043d771
add esp, 4
test esi, esi
je 0x40ac3b
lea ecx, [ebp - 0x224]
call fcn.00402020
push eax
lea ecx, [ebp - 0x278]
call fcn.00402fc0
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x290]
push eax
call fcn.0040c7b0
mov edx, eax
mov byte [ebp - 4], 0xd
cmp dword [edx + 0x14], 0x10
jb 0x40abe1
mov edx, dword [edx]
mov eax, dword [ebp - 0x260]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x30]
cmp dword [ebp - 0x27c], 0x10
jb 0x40ac05
push dword [ebp - 0x290]
call fcn.0043d771
add esp, 4
mov byte [ebp - 4], 6
cmp dword [ebp - 0x264], 8
mov dword [ebp - 0x27c], 0xf
mov dword [ebp - 0x280], 0
mov byte [ebp - 0x290], 0
jb 0x40ac3b
push dword [ebp - 0x278]
call fcn.0043d771
add esp, 4
lea ecx, [ebp - 0x224]
call fcn.00402020
mov edx, eax
mov dword [ebp - 0x264], 7
xor eax, eax
mov dword [ebp - 0x268], 0
mov word [ebp - 0x278], ax
cmp word [edx], ax
jne 0x40ac6e
xor ecx, ecx
jmp 0x40ac82
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ac73
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x278]
call fcn.00402ec0
lea eax, [ebp - 0x278]
mov byte [ebp - 4], 0xe
push eax
lea eax, [ebp - 0x290]
push eax
call fcn.0040c7b0
mov edx, eax
mov byte [ebp - 4], 0xf
cmp dword [edx + 0x14], 0x10
jb 0x40acb4
mov edx, dword [edx]
mov eax, dword [ebp - 0x260]
push edx
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
test eax, eax
sete bl
cmp dword [ebp - 0x27c], 0x10
jb 0x40acde
push dword [ebp - 0x290]
call fcn.0043d771
add esp, 4
mov byte [ebp - 4], 6
cmp dword [ebp - 0x264], 8
mov dword [ebp - 0x27c], 0xf
mov dword [ebp - 0x280], 0
mov byte [ebp - 0x290], 0
jb 0x40ad14
push dword [ebp - 0x278]
call fcn.0043d771
add esp, 4
test bl, bl
jne 0x40ad59
nop
mov ebx, dword [ebp - 0x294]
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x25c]
call fcn.00401710
test eax, eax
jne 0x40a9d5
mov edi, dword [ebp - 0x224]
mov eax, dword [ebp - 0x260]
push 0x40a780
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
test eax, eax
jne 0x40ad63
xor esi, esi
jmp 0x40ad81
mov edi, dword [ebp - 0x224]
xor esi, esi
jmp 0x40ad81
mov eax, dword [ebp - 0x260]
push ebx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x260]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov esi, 1
cmp edi, 0x4963d0
je 0x40ad92
push edi
call fcn.0043d952
add esp, 4
mov eax, dword [ebp - 0x230]
cmp eax, 0x4963d0
je 0x40ada8
push eax
call fcn.0043d952
add esp, 4
lea ecx, [ebp - 0x25c]
mov byte [ebp - 4], 1
call fcn.004012f0
jmp 0x40adbb
xor esi, esi
mov eax, dword [ebp + 8]
cmp eax, 0x4963d0
je 0x40adce
push eax
call fcn.0043d952
add esp, 4
mov eax, dword [ebp + 0x14]
cmp eax, 0x4963d0
je 0x40ade1
push eax
call fcn.0043d952
add esp, 4
mov eax, esi
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.0043d762
mov esp, ebp
pop ebp
ret 0x18