Function at 0x407144
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
push ebx
push esi
push edi
push 0x77f4
call fcn.0040eb30
add esp, 4
lea ecx, [ebp - 0x2c]
mov dword [0x4305f0], eax
mov eax, dword [ebp + 8]
push ecx
mov dword [0x4305e4], eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [ebp - 0x24]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [0x4305f0]
xor esi, esi
mov dword [0x4305e8], eax
mov eax, dword [ebp - 0x20]
cdq
sub eax, edx
push 0x104
sar eax, 1
mov dword [0x4305ec], eax
lea eax, [ebp - 0x234]
mov word [ecx + 4], si
push eax
mov ecx, dword [0x4305f0]
mov edi, 1
mov dword [ecx], esi
push dword [0x4305e4]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
lea ecx, [ebp - 0x1c]
push pe_nt_image_headers32
mov dword [ebp - 0x18], esi
push 3
lea eax, [ebp - 0x234]
push ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], 0xc
push edi
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov esi, eax
je 0x407f6a
push esi
call fcn.004034a0
add esp, 4
test eax, eax
je 0x407f63
lea eax, [ebp - 2]
mov dword [ebp - 0x10], edi
mov word [ebp - 2], 0x3c96
push eax
push esi
mov edi, 2
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 6], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 6], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 8], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 8], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0xa], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0xa], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0xc], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0xc], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0xe], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0xe], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0x10], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x10], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0x12], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x12], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0x14], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x14], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
lea eax, [ecx + 0x18]
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x36
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x54
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x73
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x91
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0xaf
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0xcd
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0xeb
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x109
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x145
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x127
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x50
mov eax, dword [0x4305f0]
add eax, 0x19f
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0x1f0], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x1f0], 3
ja 0x407992
lea eax, [ebp - 2]
mov ebx, 0xff
push eax
push ebx
lea eax, [ecx + 0x1f2]
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x2f2
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x3f2
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
mov ebx, 0x100
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0xbc3
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0xcc4
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0xdc5
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0xec6
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0xfc7
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x10c8
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x11c9
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x12ca
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x13cb
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x64
mov eax, dword [0x4305f0]
add eax, 0x14cc
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x1531
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x1632
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x1733
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x64
mov eax, dword [0x4305f0]
add eax, 0x1834
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
mov ebx, 0x7d0
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x1899
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x206a
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x283b
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x300c
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x37dd
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x64
mov eax, dword [0x4305f0]
add eax, 0x67dc
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x6841
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push ebx
mov eax, dword [0x4305f0]
add eax, 0x7012
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0x77e4], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x77e4], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push 0x1f40
lea eax, [ecx + 0x3fae]
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0x16], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x16], di
jae 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
lea eax, [ecx + 0x163]
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
push eax
push 0x1e
mov eax, dword [0x4305f0]
add eax, 0x181
push eax
push esi
call fcn.00403bfc
add esp, 0x10
test eax, eax
je 0x407992
lea eax, [ebp - 2]
mov ebx, 0xffff
push eax
push esi
call fcn.00403d12
mov word [ebp - 8], ax
add esp, 8
cmp ax, bx
je 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
mov word [ebp - 0xa], ax
add esp, 8
cmp ax, bx
je 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
mov word [ebp - 4], ax
add esp, 8
cmp ax, bx
je 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
mov word [ebp - 6], ax
add esp, 8
cmp ax, bx
je 0x407992
lea eax, [ebp - 2]
push eax
push esi
call fcn.00403d12
add esp, 8
mov ecx, dword [0x4305f0]
mov word [ecx + 0x77f0], ax
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x77f0], di
jae 0x407992
mov dword [ebp - 0x10], edi
movzx ecx, word [ebp - 0xa]
movzx eax, word [ebp - 8]
shl ecx, 0x10
mov edx, dword [0x4305f0]
or ecx, eax
push esi
mov dword [edx + 0x77e8], ecx
movzx eax, word [ebp - 4]
movzx ecx, word [ebp - 6]
shl ecx, 0x10
mov edx, dword [0x4305f0]
or ecx, eax
mov dword [edx + 0x77ec], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 2
jne 0x407f6a
mov eax, dword [0x4305f0]
add eax, 0x19f
push eax
mov eax, dword [0x4305f0]
add eax, 0x5eef
push eax
call fcn.0040e9b0
add esp, 8
lea ecx, [ebp - 0x234]
mov eax, dword [0x4305f0]
push ecx
add eax, 0x6040
push eax
call fcn.0040e9b0
add esp, 8
mov esi, dword [0x4305f0]
add esi, 0x6040
push 0x5c
push esi
call fcn.0040ee40
add esp, 8
test eax, eax
je 0x407a38
inc esi
push 0x5c
push esi
call fcn.0040ee40
add esp, 8
test eax, eax
jne 0x407a28
push esi
mov eax, dword [0x4305f0]
add eax, 0x5f40
push eax
call fcn.0040e9b0
add esp, 8
mov eax, dword [0x4305f0]
add eax, 0x6040
push eax
call fcn.0040e930
add esp, 4
mov ecx, dword [0x4305f0]
lea eax, [ecx + eax + 0x603f]
cmp byte [eax], 0x5c
je 0x407a7a
mov byte [eax], 0
dec eax
cmp byte [eax], 0x5c
jne 0x407a71
xor ebx, ebx
mov byte [eax], bl
mov eax, dword [0x4305f0]
add eax, 0x1f2
cmp byte [eax], bl
jne 0x407ad7
mov ecx, dword [0x4305f0]
add ecx, 0x6040
push ecx
push eax
call fcn.0040e9b0
add esp, 8
mov ecx, dword [0x4305f0]
cmp word [ecx + 0x77e4], bx
je 0x407ad7
mov esi, 0x1f2
lea eax, [esi + ecx]
push eax
call fcn.00403b1f
add esp, 4
mov eax, dword [0x4305f0]
add eax, esi
push 0x415908
push eax
call fcn.0040e9b8
add esp, 8
mov esi, 0xff
mov eax, dword [0x4305f0]
push esi
add eax, 0x6140
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
mov eax, dword [0x4305f0]
add eax, 0x6240
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov eax, dword [0x4305f0]
add eax, 0x6340
push eax
push esi
call fcn.00403ede
add esp, 8
mov eax, dword [0x4305f0]
add eax, 0x6440
push eax
call fcn.00403ef9
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x6540
xor ebx, ebx
push eax
push esi
call fcn.00403f36
add esp, 8
mov ecx, dword [0x4305f0]
mov edi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x77
mov byte [ecx + 0x6640], bl
mov eax, dword [0x4305e4]
push eax
call edi
mov ecx, dword [0x4305f0]
push 0x76
mov dword [ecx + 0x6784], eax
mov eax, dword [0x4305e4]
push eax
call edi
mov ecx, dword [0x4305f0]
push 0x79
mov dword [ecx + 0x6788], eax
push dword [0x4305e4]
call edi
mov ecx, dword [0x4305f0]
push 0x78
mov dword [ecx + 0x678c], eax
push dword [0x4305e4]
call edi
mov ecx, dword [0x4305f0]
push 0x89
mov dword [ecx + 0x6790], eax
push dword [0x4305e4]
call edi
mov ecx, dword [0x4305f0]
push 0x7f03
mov dword [ecx + 0x67a0], eax
push ebx
call edi
mov ecx, dword [0x4305f0]
push 0x7f04
push ebx
mov dword [ecx + 0x6794], eax
call edi
mov ecx, dword [0x4305f0]
push 0x7f02
push ebx
mov dword [ecx + 0x6798], eax
call edi
mov ecx, dword [0x4305f0]
push 0x8b
mov dword [ecx + 0x679c], eax
push dword [0x4305e4]
call dword [sym.imp.USER32.dll_LoadCursorA]
mov ecx, dword [0x4305f0]
push 0x72
mov ebx, dword [sym.imp.USER32.dll_LoadBitmapA]
mov dword [ecx + 0x67a4], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x6e
mov dword [ecx + 0x67a8], eax
mov eax, dword [0x4305e4]
push eax
call ebx
mov ecx, dword [0x4305f0]
push 0x6b
mov dword [ecx + 0x67b4], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x6c
mov dword [ecx + 0x67ac], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x6a
mov dword [ecx + 0x67b8], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x73
mov dword [ecx + 0x67b0], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x6f
mov dword [ecx + 0x67bc], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x71
mov dword [ecx + 0x67c0], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
mov dword [ecx + 0x67c4], eax
push 0x6d
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x74
mov dword [ecx + 0x67c8], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x70
mov dword [ecx + 0x67cc], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x82
mov dword [ecx + 0x67d0], eax
push dword [0x4305e4]
call ebx
mov ecx, dword [0x4305f0]
push 0x75
mov dword [ecx + 0x67d4], eax
push dword [0x4305e4]
call edi
mov ecx, dword [0x4305f0]
push 0x415904
lea edx, [ebp - 0x130]
mov edi, 0x1f2
push edx
mov dword [ecx + 0x6780], eax
mov eax, dword [0x4305f0]
add eax, edi
push eax
call fcn.00403594
add esp, 0xc
lea eax, [ebp - 0x130]
push esi
push eax
mov eax, dword [0x4305f0]
add eax, edi
push eax
call fcn.0040f730
add esp, 0xc
test eax, eax
jne 0x407d94
lea eax, [ebp - 0x130]
push eax
mov eax, dword [0x4305f0]
add eax, edi
push eax
call fcn.0040e9b0
add esp, 8
mov eax, dword [0x4305f0]
add eax, 0x1f2
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x2f2
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x3f2
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0xbc3
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0xcc4
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0xdc5
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0xec6
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0xfc7
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x10c8
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x11c9
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x12ca
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x13cb
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x14cc
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x1531
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x1632
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x1733
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x1834
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x1899
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x206a
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x283b
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x300c
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x37dd
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x6841
push eax
call fcn.00403507
add esp, 4
mov eax, dword [0x4305f0]
add eax, 0x7012
push eax
call fcn.00403507
add esp, 4
mov eax, 1
jmp 0x407f6c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret