Function at 0x402301
Capabilities:
Get common file path

Disassembly:
jmp 0x4a2e20
sub esp, 0x23c
mov eax, dword [0x589780]
xor eax, esp
mov dword [esp + 0x238], eax
push ebp
mov ebp, dword [esp + 0x24c]
push esi
mov esi, dword [esp + 0x248]
push edi
mov edi, dword [esp + 0x250]
mov dword [esp + 0xc], ebp
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x28], eax
mov dword [edi], 0x3f
test esi, esi
je 0x4a320a
push ebx
push esi
call fcn.00402ad1
xorps xmm0, xmm0
mov ebx, eax
movlpd qword [esp + 0x30], xmm0
call fcn.00403783
test eax, eax
je 0x4a2e95
push esi
call fcn.00405795
mov ecx, eax
jmp 0x4a2e9d
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
test ebx, ebx
jne 0x4a2eab
mov eax, ecx
or eax, edx
je 0x4a3209
mov eax, ecx
or eax, edx
je 0x4a302b
lea eax, [esp + 0x14]
add ecx, 0x20
push eax
push 0
push 8
lea eax, [esp + 0x2c]
adc edx, 0
push eax
push edx
push ecx
push esi
call fcn.0040b852
test eax, eax
je 0x4a3209
cmp dword [esp + 0x14], 8
jne 0x4a3209
cmp dword [esp + 0x18], 0
jne 0x4a3209
mov ecx, dword [esp + 0x20]
mov eax, ecx
mov edx, dword [esp + 0x24]
or eax, edx
je 0x4a3209
lea eax, [esp + 0x14]
add ecx, 8
push eax
push 0
push 4
lea eax, [esp + 0x28]
adc edx, 0
push eax
push edx
push ecx
push esi
call fcn.0040b852
test eax, eax
je 0x4a3209
cmp dword [esp + 0x14], 4
jne 0x4a3209
cmp dword [esp + 0x18], 0
jne 0x4a3209
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
push 0
push 0x10
lea eax, [esp + 0x3c]
add ecx, 0x70
push eax
mov eax, dword [esp + 0x34]
adc eax, 0
push eax
push ecx
push esi
call fcn.0040b852
test eax, eax
je 0x4a3209
cmp dword [esp + 0x14], 0x10
jne 0x4a3209
cmp dword [esp + 0x18], 0
jne 0x4a3209
mov cx, word [esp + 0x30]
test cx, cx
je 0x4a3209
mov ebx, dword [esp + 0x38]
mov eax, ebx
mov ebp, dword [esp + 0x3c]
or eax, ebp
je 0x4a3209
mov eax, dword [esp + 0x10]
add eax, eax
movzx edx, cx
cmp edx, eax
jb 0x4a2fd1
lea ecx, [eax - 2]
mov eax, edx
cdq
sub eax, ecx
sbb edx, 0
add ebx, eax
mov eax, dword [esp + 0x10]
adc ebp, edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebp
lea ecx, [eax*2 - 2]
mov word [esp + 0x30], cx
test byte [esp + 0x1c], 1
jne 0x4a2fe8
add ebx, dword [esp + 0x20]
mov dword [esp + 0x38], ebx
adc ebp, dword [esp + 0x24]
mov dword [esp + 0x3c], ebp
lea eax, [esp + 0x14]
push eax
movzx eax, cx
cdq
push edx
push eax
push edi
push ebp
push ebx
push esi
call fcn.0040b852
mov cx, word [esp + 0x30]
test eax, eax
je 0x4a3020
movzx eax, cx
cdq
cmp dword [esp + 0x14], eax
jne 0x4a3020
cmp dword [esp + 0x18], edx
jne 0x4a3020
mov ebp, dword [esp + 0x10]
mov al, 1
jmp 0x4a3134
mov ebp, dword [esp + 0x10]
xor al, al
jmp 0x4a3134
lea eax, [esp + 0x10]
push eax
push 4
lea eax, [esp + 0x24]
push eax
lea eax, [ebx + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push eax
push esi
call ebx
test eax, eax
je 0x4a3209
cmp dword [esp + 0x10], 4
jne 0x4a3209
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4a3209
lea ecx, [esp + 0x10]
add eax, 8
push ecx
push 4
lea ecx, [esp + 0x1c]
push ecx
push eax
push esi
call ebx
test eax, eax
je 0x4a3209
cmp dword [esp + 0x10], 4
jne 0x4a3209
lea eax, [esp + 0x10]
push eax
push 8
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x28]
add eax, 0x40
push eax
push esi
call ebx
test eax, eax
je 0x4a3209
cmp dword [esp + 0x10], 8
jne 0x4a3209
mov ax, word [esp + 0x30]
test ax, ax
je 0x4a3209
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x4a3209
lea edx, [ebp*2]
mov dword [esp + 0x20], edx
movzx edx, ax
cmp edx, dword [esp + 0x20]
jb 0x4a30ff
lea eax, [ebp*2]
add ecx, 2
sub edx, eax
lea eax, [ebp*2 - 2]
add ecx, edx
mov word [esp + 0x30], ax
mov dword [esp + 0x34], ecx
test byte [esp + 0x14], 1
jne 0x4a310e
add ecx, dword [esp + 0x1c]
mov dword [esp + 0x34], ecx
lea edx, [esp + 0x10]
movzx eax, ax
push edx
push eax
push edi
push ecx
push esi
call ebx
mov cx, word [esp + 0x30]
test eax, eax
je 0x4a3132
movzx eax, cx
cmp dword [esp + 0x10], eax
jne 0x4a3132
mov al, 1
jmp 0x4a3134
xor al, al
movzx ebx, cx
test al, al
je 0x4a3209
movzx eax, bx
xor ecx, ecx
mov dword [esp + 0x14], eax
shr eax, 1
push edi
push 0x5665c0
mov dword [esp + 0x28], eax
mov word [edi + eax*2], cx
movzx esi, word [edi + 8]
mov word [edi + 8], cx
call fcn.00405ebb
add esp, 8
mov word [edi + 8], si
lea ecx, [edi + 8]
test eax, eax
jne 0x4a3187
mov eax, dword [esp + 0x14]
add eax, 0xfffffffa
push eax
push ecx
push edi
call fcn.0040a2a9
add esp, 0xc
jmp 0x4a3201
movzx esi, word [edi + 0x18]
xor eax, eax
push edi
push str.SystemRoot_
mov word [edi + 0x18], ax
call fcn.00405ebb
add esp, 8
mov word [edi + 0x18], si
test eax, eax
jne 0x4a3201
push 0x104
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov esi, eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff6
add eax, esi
cmp eax, ebp
jb 0x4a31dc
sub ebp, esi
lea eax, [ebp*2 + 0x14]
movzx ebx, ax
mov eax, ebx
shr eax, 1
xor ecx, ecx
mov word [edi + eax*2], cx
movzx eax, bx
add esi, esi
sub eax, 0x14
push eax
lea eax, [edi + 0x16]
push eax
lea eax, [esi + edi]
push eax
call fcn.0040a2a9
push esi
lea eax, [esp + 0x50]
push eax
push edi
call fcn.00409f98
add esp, 0x18
mov dword [esp + 0x28], 1
pop ebx
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x244]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0040512d
add esp, 0x23c
ret 0xc