Function at 0x401630
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x421c22
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x428040]
xor eax, esp
mov dword [esp + 0x2d0], eax
push ebx
push esi
push edi
mov eax, dword [0x428040]
xor eax, esp
push eax
lea eax, [esp + 0x2e8]
mov dword fs:[0], eax
xor ebx, ebx
push 0x206
lea eax, [esp + 0xda]
push ebx
mov dword [esp + 0x20], ebx
push eax
mov edi, ecx
mov word [esp + 0xe0], bx
call fcn.0040faf0
add esp, 0xc
lea ecx, [esp + 0xd4]
push ecx
push ebx
push ebx
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edx, dword [0x42a3c0]
mov eax, dword [edx + 0xc]
mov ecx, 0x42a3c0
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x20], esi
push 0x69
mov dword [esp + 0x2f4], ebx
call fcn.00403240
mov ecx, eax
add esp, 4
cmp ecx, ebx
je 0x4016e8
lea edx, [esp + 0x20]
push edx
lea eax, [ebx + 0x69]
call fcn.00402610
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0xd8]
call fcn.00401fe0
mov byte [esp + 0x2f0], 1
mov eax, dword [esi - 0xc]
push eax
push esi
lea ecx, [esp + 0x1c]
push ecx
call fcn.00402a60
mov ax, word [0x424014]
mov edx, dword [0x424010]
mov word [esp + 0xd0], ax
lea ebx, [esp + 0xcc]
mov eax, edi
mov dword [esp + 0xcc], edx
call section..text
mov esi, eax
test esi, esi
je 0x4019c9
movzx eax, word [esi]
cmp ax, 0x49
je 0x4018be
cmp ax, 0x69
je 0x4018be
cmp ax, 0x73
je 0x40176e
cmp ax, 0x53
je 0x40176e
add esi, 2
jmp 0x401991
lea eax, [esp + 0xd4]
lea edx, [eax + 2]
jmp 0x401780
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401780
sub eax, edx
sar eax, 1
lea ecx, [esp + 0xd4]
mov ebx, eax
push ecx
lea eax, [esp + 0x18]
call fcn.004026e0
push 0x5b
push esi
call fcn.0040de98
mov edi, eax
add esp, 8
test edi, edi
je 0x401a68
add edi, 2
push 0x5d
push edi
call fcn.0040de98
add esp, 8
test eax, eax
mov dword [esp + 0x24], eax
je 0x401a68
mov esi, eax
sub esi, edi
sar esi, 1
cmp esi, 1
jle 0x4018b2
test edi, edi
jne 0x4017ec
test esi, esi
jne 0x401a59
mov edx, dword [0x42a3c0]
mov eax, dword [edx]
push 2
push esi
mov ecx, 0x42a3c0
call eax
test eax, eax
je 0x401a63
test esi, esi
lea ebx, [eax + 0x10]
mov dword [esp + 0x28], ebx
jl 0x401a59
cmp esi, dword [ebx - 8]
jg 0x401a59
mov dword [ebx - 0xc], esi
add esi, esi
push esi
push edi
push esi
push ebx
mov word [esi + ebx], 0
call fcn.0040dd7d
add esp, 0x10
mov byte [esp + 0x2f0], 3
mov edi, dword [esp + 0x14]
lea esi, [ebx - 0x10]
add edi, 0xfffffff0
cmp esi, edi
je 0x401891
cmp dword [edi + 0xc], 0
jl 0x401882
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x401882
mov eax, esi
call fcn.00402780
mov ebx, eax
lea eax, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x401879
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
add ebx, 0x10
mov dword [esp + 0x14], ebx
jmp 0x401891
mov eax, dword [ebx - 0xc]
push ebx
mov ebx, eax
lea eax, [esp + 0x18]
call fcn.004026e0
mov byte [esp + 0x2f0], 1
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4018b2
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov esi, dword [esp + 0x24]
add esi, 2
jmp 0x401991
add esi, 2
push 0x5b
push esi
call fcn.0040de98
mov edi, eax
add esp, 8
test edi, edi
je 0x401a68
add edi, 2
push 0x5d
push edi
call fcn.0040de98
add esp, 8
test eax, eax
mov dword [esp + 0x18], eax
je 0x401a68
mov esi, eax
sub esi, edi
sar esi, 1
cmp esi, 1
jle 0x40198e
test edi, edi
jne 0x40190b
test esi, esi
jne 0x401a59
mov edx, dword [0x42a3c0]
mov eax, dword [edx]
push 2
push esi
mov ecx, 0x42a3c0
call eax
test eax, eax
je 0x401a63
test esi, esi
lea ebx, [eax + 0x10]
mov dword [esp + 0x24], ebx
jl 0x401a59
cmp esi, dword [ebx - 8]
jg 0x401a59
mov dword [ebx - 0xc], esi
add esi, esi
push esi
push edi
push esi
push ebx
mov word [esi + ebx], 0
call fcn.0040dd7d
lea ecx, [esp + 0x34]
push ecx
mov byte [esp + 0x304], 2
call fcn.00401050
add ebx, 0xfffffff0
add esp, 0x14
mov byte [esp + 0x2f0], 1
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40198a
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov eax, dword [esp + 0x18]
lea esi, [eax + 2]
test esi, esi
je 0x4019c9
cmp word [esi], 0
je 0x4019c9
mov edi, dword [sym.imp.USER32.dll_CharNextW]
lea eax, [esp + 0xcc]
movzx ecx, word [eax]
test cx, cx
je 0x4019c0
cmp word [esi], cx
je 0x401a47
push eax
call edi
test eax, eax
jne 0x4019a8
push esi
call edi
mov esi, eax
test esi, esi
jne 0x401995
lea ecx, [esp + 0x64]
push ecx
call fcn.0040ab10
lea ebx, [esp + 0x28]
mov byte [esp + 0x2f0], 4
call fcn.004087d0
mov byte [esp + 0x2f0], 5
xor ebx, ebx
cmp dword [eax], ebx
mov dword [esp + 0x18], 1
je 0x401ac6
lea ebx, [esp + 0x24]
call fcn.00409cb0
mov dword [esp + 0x2f0], 6
cmp dword [eax], 0
mov dword [esp + 0x18], 3
je 0x401ac4
lea ebx, [esp + 0x30]
call fcn.00407860
xor ebx, ebx
cmp dword [eax], ebx
mov dword [esp + 0x18], 7
je 0x401ac6
mov byte [esp + 0x13], bl
jmp 0x401acb
push esi
call edi
mov esi, eax
test esi, esi
jne 0x401743
jmp 0x4019c9
push 0x80070057
call fcn.00403850
jmp fcn.00403500
mov byte [esp + 0x2f0], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a90
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x2f0], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401e53
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x401e53
xor ebx, ebx
mov byte [esp + 0x13], 1
test byte [esp + 0x18], 4
je 0x401afd
mov eax, dword [esp + 0x30]
and dword [esp + 0x18], 0xfffffffb
cmp eax, ebx
je 0x401af9
lea esi, [eax + 4]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp dword [esi], ebx
jne 0x401af9
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2f0], 5
test byte [esp + 0x18], 2
je 0x401b3a
mov eax, dword [esp + 0x24]
and dword [esp + 0x18], 0xfffffffd
cmp eax, ebx
je 0x401b36
lea esi, [eax + 4]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp dword [esi], ebx
jne 0x401b36
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2f0], 4
test byte [esp + 0x18], 1
je 0x401b73
mov eax, dword [esp + 0x28]
and dword [esp + 0x18], 0xfffffffe
cmp eax, ebx
je 0x401b73
lea esi, [eax + 4]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp dword [esi], ebx
jne 0x401b73
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
cmp byte [esp + 0x13], bl
je 0x401bab
lea ecx, [esp + 0x64]
push ecx
mov byte [esp + 0x2f4], 1
call fcn.0040abd0
mov byte [esp + 0x2f0], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x401a84
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
lea ebx, [esp + 0x28]
mov byte [esp + 0x2f0], 7
call fcn.00407860
mov byte [esp + 0x2f0], 8
mov eax, dword [eax]
push eax
lea eax, [esp + 0x3c]
call fcn.00407aa0
test al, al
mov byte [esp + 0x2f0], 7
mov eax, dword [esp + 0x28]
sete byte [esp + 0x13]
test eax, eax
je 0x401c0e
lea esi, [eax + 4]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp dword [esi], 0
jne 0x401c0e
mov edx, dword [ebx]
mov eax, dword [edx]
push 1
mov ecx, ebx
call eax
cmp byte [esp + 0x13], 0
jne 0x401e26
lea ecx, [esp + 0x38]
call fcn.004023e0
test eax, eax
ja 0x401c39
lea esi, [esp + 0x38]
call fcn.00402360
lea edx, [esp + 0x64]
push edx
jmp 0x401e34
push ecx
mov eax, esp
mov dword [esp + 0x2c], esp
push ecx
mov dword [eax], 0
mov eax, esp
lea esi, [esp + 0x6c]
mov dword [esp + 0x30], esp
mov dword [eax], 0
call fcn.00402410
mov eax, dword [esp + 0x68]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x401e26
lea ebx, [esp + 0x30]
mov dword [esp + 0x24], 0
call fcn.004087d0
mov byte [esp + 0x2f0], 9
mov eax, dword [eax]
or dword [esp + 0x18], 8
push eax
mov eax, dword [esp + 0x6c]
call fcn.004088a0
test al, al
je 0x401cca
lea ebx, [esp + 0x28]
call fcn.00409cb0
mov dword [esp + 0x2f0], 0xa
mov ebx, dword [eax]
mov eax, dword [esp + 0x68]
or dword [esp + 0x18], 0x10
call fcn.00409d80
test al, al
mov byte [esp + 0x13], 1
jne 0x401ccf
mov byte [esp + 0x13], 0
mov dword [esp + 0x2f0], 9
test byte [esp + 0x18], 0x10
je 0x401cef
and dword [esp + 0x18], 0xffffffef
lea ebx, [esp + 0x28]
call fcn.0040a3e0
mov dword [esp + 0x2f0], 7
test byte [esp + 0x18], 8
je 0x401d0a
lea ebx, [esp + 0x30]
call fcn.0040a3e0
cmp byte [esp + 0x13], 0
je 0x401dca
lea esi, [esp + 0x28]
lea edi, [esp + 0x38]
call fcn.004023a0
mov edx, dword [eax]
mov eax, dword [eax + 4]
lea esi, [esp + 0x18]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
call fcn.004023c0
mov esi, eax
lea edi, [esp + 0x30]
call fcn.004024e0
test al, al
je 0x401dca
jmp 0x401d50
lea esi, [esp + 0x30]
call fcn.004024a0
lea ebx, [esp + 0x28]
mov esi, eax
call fcn.004087d0
mov byte [esp + 0x2f0], 0xb
mov eax, dword [eax]
mov edx, dword [esi + 0x10]
mov ecx, dword [esp + 0x14]
push esi
push eax
call fcn.004089d0
mov byte [esp + 0x13], al
mov byte [esp + 0x2f0], 7
call fcn.0040a3e0
cmp byte [esp + 0x13], 0
je 0x401dc3
lea esi, [esp + 0x30]
mov dword [esp + 0x24], 1
call fcn.004024c0
lea esi, [esp + 0x18]
lea edi, [esp + 0x38]
call fcn.004023c0
mov esi, eax
lea edi, [esp + 0x30]
call fcn.004024e0
test al, al
jne 0x401d50
jmp 0x401de4
cmp dword [esp + 0x24], 0
jne 0x401de4
mov ecx, dword [esp + 0x68]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x401de4
mov edx, dword [esp + 0x68]
push edx
call dword [sym.imp.USER32.dll_DestroyWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push 0
push 0
push 0
lea eax, [esp + 0x54]
push eax
call esi
test eax, eax
je 0x401e26
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea ecx, [esp + 0x48]
push ecx
call edi
lea edx, [esp + 0x48]
push edx
call ebx
push 0
push 0
push 0
lea eax, [esp + 0x54]
push eax
call esi
test eax, eax
jne 0x401e07
lea esi, [esp + 0x38]
call fcn.00402360
lea ecx, [esp + 0x64]
push ecx
mov byte [esp + 0x2f4], 1
call fcn.0040abd0
lea eax, [esp + 0x14]
call fcn.004020f0
lea eax, [esp + 0x20]
call fcn.004020f0
mov ecx, dword [esp + 0x2e8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2d0]
xor ecx, esp
call fcn.0040d942
mov esp, ebp
pop ebp
ret