Function at 0x404000
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, dword [ebp + 8]
sub esp, 0x74
push ebx
push esi
push edi
push 0x519d88
mov dword [0x51aec4], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x51b6d8
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x404115
xor ecx, ecx
mov word [0x51b6d8], cx
mov esi, 0x4f5ac4
mov eax, dword [0x518c04]
mov dword [0x51b6d4], esi
mov esi, 1
mov edi, eax
mov byte [esp + 0x30], 0
mov byte [esp + 0x2a], 0
mov dword [esp + 0x2c], esi
mov dword [esp + 0x34], edi
cmp eax, esi
jle 0x40430b
lea esp, [esp]
cmp byte [esp + 0x2a], 0
mov eax, dword [0x518c0c]
mov ebx, dword [eax + esi*4]
je 0x404189
mov ecx, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x44]
push 0x4e6a2c
push edx
call fcn.004c9fb7
add esp, 0xc
cmp word [esp + 0x40], 0
mov edi, eax
je 0x40469d
lea eax, [esp + 0x2b]
push eax
push 3
lea ecx, [esp + 0x40]
push ecx
push edi
lea edx, [esp + 0x50]
push edx
mov ecx, 0x51c0f8
call fcn.00421a00
test eax, eax
jne 0x4040ff
cmp byte [esp + 0x2b], al
mov ecx, dword [esp + 0x38]
setne al
lea edx, [esp + 0x40]
inc eax
push eax
push ecx
push edx
push 0x51c0f8
mov ecx, edi
call fcn.00421cb0
test eax, eax
je 0x40469d
push 1
push 0
push 0xffffffffffffffff
push ebx
push eax
call fcn.004aefb0
inc dword [esp + 0x2c]
jmp 0x4042fa
cmp word [0x51b6d8], 0
je 0x404048
mov eax, 0x51b6d8
lea edx, [eax + 2]
jmp 0x404130
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404130
sub eax, edx
sar eax, 1
mov ebx, eax
lea edi, [ebx + ebx]
lea eax, [edi + 2]
call fcn.004a3da0
mov esi, eax
test esi, esi
jne 0x40416b
push 0x51b6d8
push str.Out_of_memory.
mov ecx, 0x51c0f8
call fcn.00477180
jmp 0x40404d
test ebx, ebx
je 0x40417e
push edi
push 0x51b6d8
push esi
call fcn.004d23c0
add esp, 0xc
xor edx, edx
mov word [edi + esi], dx
jmp 0x40404d
push 0x4e6a34
call fcn.004a4b10
add esp, 4
push eax
push ebx
call fcn.004c9bad
add esp, 8
test eax, eax
jne 0x4041f2
inc esi
mov dword [0x51dcc0], 1
cmp esi, dword [0x518c04]
jge 0x40469d
mov eax, dword [0x518c0c]
mov ebx, dword [eax + esi*4]
mov eax, 0x51dcdc
call fcn.00414350
inc esi
cmp esi, dword [0x518c04]
jge 0x40469d
mov ecx, dword [0x518c0c]
mov ebx, dword [ecx + esi*4]
mov eax, 0x51dcd0
call fcn.00414350
jmp 0x4042fa
push 0x4e6a60
call fcn.004a4b10
add esp, 4
push eax
push ebx
call fcn.004c9bad
add esp, 8
test eax, eax
jne 0x40425b
inc esi
mov dword [0x51dcc0], 2
cmp esi, dword [0x518c04]
jge 0x40469d
mov edx, dword [0x518c0c]
mov ebx, dword [edx + esi*4]
mov eax, 0x51dcdc
call fcn.00414350
inc esi
cmp esi, dword [0x518c04]
jge 0x40469d
mov eax, dword [0x518c0c]
mov ebx, dword [eax + esi*4]
mov eax, 0x51dcd0
call fcn.00414350
jmp 0x4042fa
push 0x4e6a94
push ebx
call fcn.004c9bad
add esp, 8
test eax, eax
je 0x4042f5
push 0x4e6a9c
call fcn.004a4b10
add esp, 4
push eax
push ebx
call fcn.004c9bad
add esp, 8
test eax, eax
je 0x4042f5
push 0x4e6ac0
push ebx
call fcn.004c9bad
add esp, 8
test eax, eax
je 0x4042ec
push 0x4e6ac8
call fcn.004a4b10
add esp, 4
push eax
push ebx
call fcn.004c9bad
add esp, 8
test eax, eax
je 0x4042ec
push 0x4e6ae8
call fcn.004a4b10
add esp, 4
push eax
push ebx
call fcn.004c9bad
add esp, 8
test eax, eax
jne 0x4042dd
mov byte [0x51cbd7], 1
jmp 0x4042fa
dec esi
lea ecx, [esi + 1]
mov byte [esp + 0x2a], 1
mov dword [esp + 0x34], ecx
jmp 0x4042fa
mov byte [0x51aff1], 1
jmp 0x4042fa
mov byte [esp + 0x30], 1
inc esi
cmp esi, dword [0x518c04]
jl 0x404080
mov edi, dword [esp + 0x34]
lea edx, [esp + 0x2b]
push edx
push 3
lea eax, [esp + 0x40]
push eax
push 0
push 0x4e6a28
mov ecx, 0x51c0f8
call fcn.00421a00
test eax, eax
jne 0x40434d
mov edx, dword [esp + 0x38]
xor ecx, ecx
cmp byte [esp + 0x2b], cl
setne cl
inc ecx
push ecx
push edx
push 0x4e6a28
push 0x51c0f8
xor ecx, ecx
call fcn.00421cb0
mov ecx, eax
test ecx, ecx
je 0x40469d
mov eax, dword [esp + 0x2c]
dec eax
cdq
push 0x18
push edx
push eax
mov eax, ecx
call fcn.00401590
push 0x4e6b14
call fcn.004a4b10
mov esi, eax
add esp, 4
cmp word [esi], 0
je 0x40469d
lea eax, [esp + 0x2b]
push eax
push 0xc1
lea ecx, [esp + 0x40]
push ecx
push 6
push esi
mov ecx, 0x51c0f8
call fcn.00421a00
test eax, eax
jne 0x4043c7
mov eax, dword [esp + 0x38]
xor edx, edx
cmp byte [esp + 0x2b], dl
mov ecx, 6
setne dl
inc edx
or edx, 0xc0
push edx
push eax
push esi
push 0x51c0f8
call fcn.00421cb0
mov esi, eax
test esi, esi
je 0x40469d
mov ecx, dword [0x518c0c]
mov ebx, dword [0x518c04]
lea edx, [ecx + edi*4]
sub ebx, edi
push edx
call fcn.0049fe60
add esp, 4
test eax, eax
je 0x40469d
mov edi, eax
mov ecx, esi
call fcn.004af2e0
call fcn.00403e90
mov eax, dword [esp + 0x30]
push eax
push 0x51c0f8
call fcn.0041cbd0
cmp eax, 1
jne 0x40469d
mov esi, dword [0x5165ec]
mov ecx, 0x42
mov edi, 0x519af0
mov eax, 0x51c0f8
rep movsd dword es:[edi], dword [esi]
call fcn.0046c7c0
cmp eax, 0xffffffff
je 0x40469d
cmp dword [0x51dcc0], 0
je 0x404455
mov eax, dword [0x51dce8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
test eax, eax
je 0x404692
mov eax, dword [0x51b020]
test eax, eax
jne 0x4044a1
mov ecx, dword [0x516610]
cmp word [ecx], ax
jne 0x404495
cmp dword [0x51b940], eax
jne 0x404495
cmp dword [0x51b000], eax
jne 0x404495
cmp dword [0x51b004], eax
jne 0x404495
cmp byte [0x51b024], al
je 0x40452b
mov dword [0x51b020], 1
jmp 0x4044aa
cmp eax, 4
je 0x40452b
cmp byte [esp + 0x30], 0
jne 0x404536
cmp byte [0x51aff1], 0
jne 0x4045bf
mov edx, dword [0x51cbd0]
mov eax, dword [0x51e5ec]
push edx
push eax
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
je 0x4045bf
mov eax, dword [0x51b020]
cmp eax, 3
je 0x404692
cmp eax, 2
je 0x404524
fldz
mov ecx, dword [0x51cbc4]
sub esp, 8
fstp qword [esp]
push 0
push ecx
push 4
push 0x4e6b38
call fcn.004a4b10
add esp, 4
push eax
call fcn.004b0b80
add esp, 0x18
cmp eax, 7
je 0x404692
mov eax, 0x407
jmp 0x404554
cmp byte [esp + 0x30], 0
je 0x4045bf
mov edx, dword [0x51cbd0]
mov eax, dword [0x51e5ec]
push edx
push eax
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, eax
test edi, edi
je 0x4045bf
mov eax, 0x406
push 0
push eax
push 0x44
push edi
call dword [sym.imp.USER32.dll_PostMessageW]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
xor esi, esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4045bb
cmp esi, 0x64
jne 0x4045ab
fldz
sub esp, 8
fstp qword [esp]
push 0
push 0
push 4
push 0x4e6c78
call fcn.004a4b10
add esp, 4
push eax
call fcn.004b0b80
add esp, 0x18
cmp eax, 7
je 0x40469d
xor esi, esi
push 0x14
inc esi
call ebx
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x404577
push 0x64
call ebx
call fcn.004b1910
push 0x51c0f8
call fcn.0041cde0
cmp eax, 1
jne 0x40469d
push 0
push 4
push 0
call fcn.004ca161
add eax, 0x20
push eax
call fcn.004ca06b
mov esi, dword [0x5164f8]
add esp, 0x10
test esi, esi
je 0x40461c
imul esi, esi, 0xd4
push esi
call fcn.004c9c38
add esp, 4
mov dword [0x51b8e4], eax
test eax, eax
je 0x40461c
push esi
push 0
push eax
call fcn.004d2f90
add esp, 0xc
cmp byte [0x51cd92], 0
jne 0x404640
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x3c], 8
mov dword [esp + 0x40], 0x1ff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
call fcn.0040a500
push 3
push 0
push 0x4e6d14
mov byte [0x51cbd4], 1
mov byte [0x51b6cd], 0
call fcn.004a4b10
add esp, 4
push eax
mov ecx, 0x51c0f8
call fcn.004219a0
test eax, eax
je 0x404678
call fcn.00403fd0
push 0x51c0f8
call fcn.0041d3e0
test eax, eax
je 0x40469d
push 0
push 0xa
call fcn.00401930
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x10