Function at 0x100498e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
push esi
mov dword [ebp - 0x50], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x70], eax
mov eax, 2
imul ecx, eax, 0
mov edx, 0x3f
mov eax, dword [ebp + 0xc]
mov word [eax + ecx], dx
mov ecx, 2
shl ecx, 0
xor edx, edx
mov eax, dword [ebp + 0xc]
mov word [eax + ecx], dx
cmp dword [ebp + 8], 0
je 0x10049db1
mov ecx, dword [ebp + 8]
push ecx
call fcn.1003b930
mov dword [ebp - 0x58], eax
xorpd xmm0, xmm0
movlpd qword [ebp - 0x48], xmm0
call fcn.1003ccd0
test eax, eax
je 0x10049956
mov edx, dword [ebp + 8]
push edx
call fcn.1003b8d0
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], edx
cmp dword [ebp - 0x58], 0
jne 0x10049968
mov eax, dword [ebp - 0x48]
or eax, dword [ebp - 0x44]
je 0x10049db1
mov byte [ebp - 5], 0
xor ecx, ecx
mov word [ebp - 4], cx
mov edx, dword [ebp - 0x48]
or edx, dword [ebp - 0x44]
je 0x10049b11
lea eax, [ebp - 0x20]
push eax
push 0
push 8
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x48]
add edx, 0x20
mov eax, dword [ebp - 0x44]
adc eax, 0
push eax
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.1003c9f0
test eax, eax
je 0x10049b0c
cmp dword [ebp - 0x20], 8
jne 0x10049b0c
cmp dword [ebp - 0x1c], 0
jne 0x10049b0c
mov edx, dword [ebp - 0x40]
or edx, dword [ebp - 0x3c]
je 0x10049b0c
lea eax, [ebp - 0x20]
push eax
push 0
push 4
lea ecx, [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x40]
add edx, 8
mov eax, dword [ebp - 0x3c]
adc eax, 0
push eax
push edx
mov ecx, dword [ebp + 8]
push ecx
call fcn.1003c9f0
test eax, eax
je 0x10049b0c
cmp dword [ebp - 0x20], 4
jne 0x10049b0c
cmp dword [ebp - 0x1c], 0
jne 0x10049b0c
lea edx, [ebp - 0x20]
push edx
push 0
push 0x10
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x40]
add ecx, 0x70
mov edx, dword [ebp - 0x3c]
adc edx, 0
push edx
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.1003c9f0
test eax, eax
je 0x10049b0c
cmp dword [ebp - 0x20], 0x10
jne 0x10049b0c
cmp dword [ebp - 0x1c], 0
jne 0x10049b0c
movzx ecx, word [ebp - 0x34]
test ecx, ecx
je 0x10049b0c
mov edx, dword [ebp - 0x2c]
or edx, dword [ebp - 0x28]
je 0x10049b0c
movzx eax, word [ebp - 0x34]
mov ecx, dword [ebp + 0x10]
shl ecx, 1
cmp eax, ecx
jb 0x10049a95
movzx eax, word [ebp - 0x34]
cdq
add eax, dword [ebp - 0x2c]
adc edx, dword [ebp - 0x28]
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx + ecx - 2]
xor esi, esi
sub eax, ecx
sbb edx, esi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edx
mov edx, dword [ebp + 0x10]
lea eax, [edx + edx - 2]
mov word [ebp - 0x34], ax
mov ecx, dword [ebp - 0x60]
and ecx, 1
jne 0x10049aaf
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x28]
adc eax, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x20]
push ecx
movzx eax, word [ebp - 0x34]
cdq
push edx
push eax
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.1003c9f0
test eax, eax
je 0x10049af7
movzx eax, word [ebp - 0x34]
cdq
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x68]
jne 0x10049af7
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x64]
jne 0x10049af7
mov dword [ebp - 0x54], 1
jmp 0x10049afe
mov dword [ebp - 0x54], 0
mov dl, byte [ebp - 0x54]
mov byte [ebp - 5], dl
mov ax, word [ebp - 0x34]
mov word [ebp - 4], ax
jmp 0x10049c3a
lea ecx, [ebp - 0x10]
push ecx
push 4
lea edx, [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x58]
add eax, 0x10
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x10049c3a
cmp dword [ebp - 0x10], 4
jne 0x10049c3a
cmp dword [ebp - 0x38], 0
je 0x10049c3a
lea edx, [ebp - 0x10]
push edx
push 4
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x38]
add ecx, 8
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x10049c3a
cmp dword [ebp - 0x10], 4
jne 0x10049c3a
lea eax, [ebp - 0x10]
push eax
push 8
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x38]
add edx, 0x40
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x10049c3a
cmp dword [ebp - 0x10], 8
jne 0x10049c3a
movzx ecx, word [ebp - 0x18]
test ecx, ecx
je 0x10049c3a
cmp dword [ebp - 0x14], 0
je 0x10049c3a
movzx edx, word [ebp - 0x18]
mov eax, dword [ebp + 0x10]
shl eax, 1
cmp edx, eax
jb 0x10049be3
movzx ecx, word [ebp - 0x18]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 0x10]
lea eax, [edx + edx - 2]
sub ecx, eax
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + ecx - 2]
mov word [ebp - 0x18], dx
mov eax, dword [ebp - 0x6c]
and eax, 1
jne 0x10049bf4
mov ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x38]
mov dword [ebp - 0x14], ecx
lea edx, [ebp - 0x10]
push edx
movzx eax, word [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x10049c25
movzx ecx, word [ebp - 0x18]
cmp dword [ebp - 0x10], ecx
jne 0x10049c25
mov dword [ebp - 0x5c], 1
jmp 0x10049c2c
mov dword [ebp - 0x5c], 0
mov dl, byte [ebp - 0x5c]
mov byte [ebp - 5], dl
mov ax, word [ebp - 0x18]
mov word [ebp - 4], ax
movzx ecx, byte [ebp - 5]
test ecx, ecx
je 0x10049db1
movzx eax, word [ebp - 4]
cdq
sub eax, edx
sar eax, 1
xor edx, edx
mov ecx, dword [ebp + 0xc]
mov word [ecx + eax*2], dx
mov edx, 2
shl edx, 2
mov eax, dword [ebp + 0xc]
mov cx, word [eax + edx]
mov word [ebp - 0xc], cx
mov edx, 2
shl edx, 2
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov word [ecx + edx], ax
mov edx, dword [ebp + 0xc]
push edx
push 0x1007d3e4
call fcn.100513c3
add esp, 8
mov dword [ebp - 0x4c], eax
mov eax, 2
shl eax, 2
mov ecx, dword [ebp + 0xc]
mov dx, word [ebp - 0xc]
mov word [ecx + eax], dx
cmp dword [ebp - 0x4c], 0
jne 0x10049cce
movzx eax, word [ebp - 4]
sub eax, 6
push eax
mov ecx, 2
shl ecx, 2
add ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.10051540
add esp, 0xc
jmp 0x10049daa
mov eax, 2
imul ecx, eax, 0xc
mov edx, dword [ebp + 0xc]
mov ax, word [edx + ecx]
mov word [ebp - 0xc], ax
mov ecx, 2
imul edx, ecx, 0xc
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov word [ecx + edx], ax
mov edx, dword [ebp + 0xc]
push edx
push str.SystemRoot_
call fcn.100513c3
add esp, 8
mov dword [ebp - 0x4c], eax
mov eax, 2
imul ecx, eax, 0xc
mov edx, dword [ebp + 0xc]
mov ax, word [ebp - 0xc]
mov word [edx + ecx], ax
cmp dword [ebp - 0x4c], 0
jne 0x10049daa
push 0x104
lea ecx, [ebp - 0x278]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov dword [ebp - 0x24], eax
movzx edx, word [ebp - 4]
shr edx, 1
mov eax, dword [ebp - 0x24]
lea ecx, [edx + eax - 0xa]
cmp ecx, dword [ebp + 0x10]
jb 0x10049d6b
mov edx, dword [ebp + 0x10]
add edx, 0xa
sub edx, dword [ebp - 0x24]
shl edx, 1
mov word [ebp - 4], dx
movzx eax, word [ebp - 4]
cdq
sub eax, edx
sar eax, 1
xor ecx, ecx
mov edx, dword [ebp + 0xc]
mov word [edx + eax*2], cx
movzx eax, word [ebp - 4]
sub eax, 0x14
push eax
mov ecx, 2
imul edx, ecx, 0xb
add edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + eax*2]
push edx
call fcn.10051540
add esp, 0xc
mov eax, dword [ebp - 0x24]
shl eax, 1
push eax
lea ecx, [ebp - 0x278]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.10051540
add esp, 0xc
mov dword [ebp - 0x50], 1
mov eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x50]
pop esi
mov esp, ebp
pop ebp
ret 0xc