Function at 0x40941f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov dword [eax + 0x118], 0
cmp dword [ebp + 0xc], 0x2b0
jbe 0x409472
call fcn.00406906
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x40945e
mov eax, 0xffffffff
jmp 0x409b4e
test byte [ebp - 8], 2
je 0x409472
mov eax, dword [ebp + 8]
or dword [eax + 0x118], 2
push 0x200
push 0x5a6480
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0x4a17a0
push 0x5a6480
call fcn.0041bfb0
add esp, 8
mov dword [0x5a3050], 0
jmp 0x4094a9
inc dword [0x5a3050]
cmp dword [0x5a3050], 0x3000
jge 0x4094ca
mov eax, dword [0x5a3050]
mov byte [eax + 0x5a3060], 0
jmp 0x4094a3
cmp dword [ebp + 0xc], 0x2b0
jbe 0x4094e4
mov eax, dword [ebp + 8]
mov dword [eax + 0x2b0], 0
push 0x5a98c0
push 0x5a3060
push 0x5a6480
call fcn.00409b53
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40951b
push 0x2002019
call fcn.004042f8
add esp, 4
mov eax, 0xffffffff
jmp 0x409b4e
push 0x5a6684
mov ax, word [0x5a98c0]
push eax
push 0x5a3060
push 0x4a17ac
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40956a
push 0x80002
call fcn.0040435c
add esp, 4
push 0x2002019
call fcn.004042f8
add esp, 4
mov eax, 0xffffffff
jmp 0x409b4e
push 0x5a6686
xor eax, eax
mov ax, word [0x5a98c0]
xor ecx, ecx
mov cx, word [0x5a6684]
sub eax, ecx
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0x4a17b8
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4095b0
mov eax, dword [ebp + 8]
or dword [eax + 0x118], 1
jmp 0x4095b7
xor eax, eax
jmp 0x409b4e
push 0x5a6684
mov ax, word [0x5a98c0]
push eax
push 0x5a3060
push 0x4a17c4
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x409603
push 0x5a6684
mov ax, word [0x5a98c0]
push eax
push 0x5a3060
push 0x4a17cc
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x409651
push 0x4a17d8
mov eax, dword [ebp + 8]
push eax
call fcn.0041bfa0
add esp, 8
push 0x4a17e0
mov eax, dword [ebp + 8]
add eax, 0x80
push eax
call fcn.0041bfa0
add esp, 8
push 0x4a17e8
mov eax, dword [ebp + 8]
add eax, 0x98
push eax
call fcn.0041bfa0
add esp, 8
xor eax, eax
jmp 0x409b4e
push 0x5a9b30
xor eax, eax
mov ax, word [0x5a98c0]
xor ecx, ecx
mov cx, word [0x5a6684]
sub eax, ecx
push eax
mov eax, dword [ebp - 0x10]
inc eax
push eax
push 0x4a17f0
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x409698
mov ax, word [0x5a9b30]
mov word [ebp - 4], ax
jmp 0x4096af
xor eax, eax
mov ax, word [0x5a98c0]
xor ecx, ecx
mov cx, word [0x5a6684]
sub eax, ecx
mov word [ebp - 4], ax
push 0x5a6686
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0x4a17f4
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x409775
mov word [ebp - 0xc], 0
push 0x4a17fc
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
add eax, ecx
mov ecx, dword [ebp - 0x14]
mov al, byte [eax + ecx + 1]
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
mov edx, dword [ebp + 8]
mov byte [ecx + edx], al
inc word [ebp - 0xc]
mov eax, dword [ebp - 0xc]
and eax, 0xffff
mov ecx, dword [ebp + 8]
movsx eax, byte [eax + ecx - 1]
movsx ecx, byte [0x4a1168]
cmp eax, ecx
je 0x409760
push 0x4a1804
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
add eax, ecx
add eax, dword [ebp - 0x14]
inc eax
xor ecx, ecx
mov cx, word [0x5a98c0]
add ecx, 0x5a3060
cmp eax, ecx
jbe 0x4096dc
mov eax, dword [ebp - 0xc]
and eax, 0xffff
mov ecx, dword [ebp + 8]
mov byte [eax + ecx - 1], 0
jmp 0x409786
push 0x4a180c
mov eax, dword [ebp + 8]
push eax
call fcn.0041bfa0
add esp, 8
push 0x5a6686
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0x4a1814
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x409850
mov word [ebp - 0xc], 0
push 0x4a181c
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
add eax, ecx
mov ecx, dword [ebp - 0x14]
mov al, byte [eax + ecx + 1]
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
mov edx, dword [ebp + 8]
mov byte [ecx + edx + 0x80], al
inc word [ebp - 0xc]
mov eax, dword [ebp - 0xc]
and eax, 0xffff
mov ecx, dword [ebp + 8]
movsx eax, byte [eax + ecx + 0x7f]
movsx ecx, byte [0x4a1168]
cmp eax, ecx
je 0x40983b
push 0x4a1824
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
add eax, ecx
add eax, dword [ebp - 0x14]
inc eax
xor ecx, ecx
mov cx, word [0x5a98c0]
add ecx, 0x5a3060
cmp eax, ecx
jbe 0x4097b3
mov eax, dword [ebp - 0xc]
and eax, 0xffff
mov ecx, dword [ebp + 8]
mov byte [eax + ecx + 0x7f], 0
jmp 0x409866
push 0x4a182c
mov eax, dword [ebp + 8]
add eax, 0x80
push eax
call fcn.0041bfa0
add esp, 8
push 0x5a6686
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0x4a1834
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x409936
mov word [ebp - 0xc], 0
push 0x4a1844
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
add eax, ecx
mov ecx, dword [ebp - 0x14]
mov al, byte [eax + ecx + 1]
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
mov edx, dword [ebp + 8]
mov byte [ecx + edx + 0x98], al
inc word [ebp - 0xc]
mov eax, dword [ebp - 0xc]
and eax, 0xffff
mov ecx, dword [ebp + 8]
movsx eax, byte [eax + ecx + 0x97]
movsx ecx, byte [0x4a1168]
cmp eax, ecx
je 0x40991e
push 0x4a1854
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0xc]
and ecx, 0xffff
add eax, ecx
add eax, dword [ebp - 0x14]
inc eax
xor ecx, ecx
mov cx, word [0x5a98c0]
add ecx, 0x5a3060
cmp eax, ecx
jbe 0x409893
mov eax, dword [ebp - 0xc]
and eax, 0xffff
mov ecx, dword [ebp + 8]
mov byte [eax + ecx + 0x97], 0
jmp 0x40994c
push 0x4a1864
mov eax, dword [ebp + 8]
add eax, 0x98
push eax
call fcn.0041bfa0
add esp, 8
push 0x5a6686
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0x4a186c
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4099fd
push 0x4a187c
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0x14]
mov al, byte [ecx + eax + 1]
mov byte [0x5a98c2], al
mov byte [0x5a98c3], 0
push 0x4a188c
push 0x5a98c2
call fcn.0041d600
add esp, 8
test eax, eax
jne 0x4099bf
mov eax, dword [ebp + 8]
mov dword [eax + 0x94], 1
jmp 0x4099f8
push 0x4a1890
push 0x5a98c2
call fcn.0041d600
add esp, 8
test eax, eax
jne 0x4099eb
mov eax, dword [ebp + 8]
mov dword [eax + 0x94], 2
jmp 0x4099f8
mov eax, dword [ebp + 8]
mov dword [eax + 0x94], 0xffffffff
jmp 0x409a0a
mov eax, dword [ebp + 8]
mov dword [eax + 0x94], 0xffffffff
push 0x5a6686
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0x4a1894
call fcn.00407518
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x409b13
push 0x4a18a0
call fcn.0041bdf0
add esp, 4
mov ecx, dword [ebp - 0x14]
mov al, byte [ecx + eax + 1]
mov byte [0x5a98c2], al
mov byte [0x5a98c3], 0
push 0x4a18ac
push 0x5a98c2
call fcn.0041d600
add esp, 8
test eax, eax
jne 0x409a7d
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a0], 1
jmp 0x409b0e
push 0x4a18b0
push 0x5a98c2
call fcn.0041d600
add esp, 8
test eax, eax
jne 0x409aa9
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a0], 2
jmp 0x409b0e
push 0x4a18b4
push 0x5a98c2
call fcn.0041d600
add esp, 8
test eax, eax
jne 0x409ad5
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a0], 4
jmp 0x409b0e
push 0x4a18b8
push 0x5a98c2
call fcn.0041d600
add esp, 8
test eax, eax
jne 0x409b01
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a0], 8
jmp 0x409b0e
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a0], 0xffffffff
jmp 0x409b20
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a0], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a4], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x1a8], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x1ac], 0
xor eax, eax
jmp 0x409b4e
pop edi
pop esi
pop ebx
leave
ret