Function at 0x420fd0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x640
push edi
mov edi, dword [ebp + 0x10]
test eax, eax
je 0x420fea
cmp word [eax], 0
jne 0x420ffc
test edi, edi
je 0x421526
cmp word [edi], 0
je 0x421526
mov ecx, dword [0x50b3a4]
push ebx
call fcn.0044e690
mov ebx, eax
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x42101c
cmp word [ebx], 0
jne 0x42101c
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 8]
push esi
xor esi, esi
test eax, eax
je 0x4210f4
cmp word [eax], si
je 0x4210f4
cmp dword [ebp + 0xc], esi
je 0x4211d7
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x421040
sub eax, edx
sar eax, 1
mov edi, eax
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x421057
sub eax, edx
sar eax, 1
test ebx, ebx
je 0x421081
mov ecx, ebx
lea esi, [ecx + 2]
nop
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x421070
sub ecx, esi
sar ecx, 1
jmp 0x421083
xor ecx, ecx
add ecx, eax
lea edi, [ecx + edi + 0x20]
lea eax, [edi + edi]
push eax
call fcn.004412a0
mov esi, eax
add esp, 4
test esi, esi
je 0x42116b
mov edx, dword [ebp + 0xc]
push edx
push edi
xor ecx, ecx
push esi
mov word [esi], cx
call fcn.00401880
push 0x4c2f1c
push edi
push esi
call fcn.00401880
test ebx, ebx
je 0x4210df
push str._config__
push edi
push esi
call fcn.00401880
push ebx
push edi
push esi
call fcn.00401880
push 0x4c2924
push edi
push esi
call fcn.00401880
push 0x4c2904
push edi
push esi
call fcn.00401880
mov eax, dword [ebp + 8]
push eax
jmp 0x4211cd
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x421100
mov ebx, dword [ebp + 0xc]
sub eax, edx
sar eax, 1
test ebx, ebx
je 0x421133
mov ecx, ebx
lea esi, [ecx + 2]
jmp 0x421120
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x421120
sub ecx, esi
sar ecx, 1
mov edi, ecx
jmp 0x421135
xor edi, edi
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x421151
lea esi, [ecx + 2]
nop
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x421140
sub ecx, esi
sar ecx, 1
jmp 0x421153
xor ecx, ecx
add ecx, edi
lea edi, [ecx + eax + 0x20]
lea ecx, [edi + edi]
push ecx
call fcn.004412a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x421177
pop esi
pop ebx
mov eax, 0x8000ffff
pop edi
mov esp, ebp
pop ebp
ret
xor edx, edx
mov word [esi], dx
test ebx, ebx
je 0x421194
push ebx
push edi
push esi
call fcn.00401880
push 0x4c2f1c
push edi
push esi
call fcn.00401880
cmp dword [ebp - 4], 0
je 0x4211bd
push str._config__
push edi
push esi
call fcn.00401880
mov eax, dword [ebp - 4]
push eax
push edi
push esi
call fcn.00401880
push 0x4c2924
push edi
push esi
call fcn.00401880
push 0x4c2904
push edi
push esi
call fcn.00401880
mov ecx, dword [ebp + 0x10]
push ecx
push edi
push esi
call fcn.00401880
mov dword [ebp + 8], esi
lea edx, [ebp - 8]
push edx
push 0x4e5a78
push 1
push 0
push 0x4e5ba8
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov edi, eax
test edi, edi
jl 0x421510
push 0x104
lea eax, [ebp - 0x640]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4214ef
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
lea edx, [ebp - 0x640]
push edx
push eax
mov eax, dword [ecx + 0x50]
call eax
xor ecx, ecx
xor edx, edx
push edx
mov word [ebp - 0x438], cx
mov dword [ebp - 0xc], ecx
lea ecx, [ebp - 0x22c]
mov word [ebp - 0x22c], dx
mov edi, eax
mov eax, dword [ebp + 8]
push ecx
lea edx, [ebp - 4]
push edx
mov dword [ebp - 4], eax
call fcn.004044b0
add esp, 0xc
test eax, eax
jne 0x4213e2
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x421270
push 0x4cd1a4
lea eax, [ebp - 0x22c]
push eax
call ebx
lea ecx, [ebp - 0x22c]
test eax, eax
je 0x4212b2
push str._cmd
push ecx
call ebx
test eax, eax
je 0x4212cb
push 0
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 4]
push eax
call fcn.004044b0
add esp, 0xc
test eax, eax
je 0x421270
jmp 0x4213e2
push 0
push ecx
lea edx, [ebp - 4]
push edx
call fcn.004044b0
add esp, 0xc
test eax, eax
jne 0x4213e2
jmp 0x421325
mov eax, dword [ebp - 4]
movzx ecx, word [eax]
cmp cx, 0x40
je 0x4212f0
cmp cx, 0x7b
je 0x4212f0
push str._Startup_
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x421308
mov eax, dword [ebp - 4]
mov ecx, dword [0x50b39c]
push 0
push eax
call fcn.00412410
mov dword [ebp - 0xc], eax
test eax, eax
je 0x421308
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 4]
push ecx
call fcn.004044b0
add esp, 0xc
test eax, eax
jne 0x4213d2
cmp word [ebp - 0x22c], 0
je 0x4213d2
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x438]
push eax
push 0x105
lea ecx, [ebp - 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x421370
cmp eax, 0x105
jae 0x421370
lea edx, [ebp - 0x438]
push 0
push edx
call fcn.004acca0
add esp, 8
test eax, eax
jne 0x4213d2
mov ebx, dword [sym.imp.KERNEL32.dll_SearchPathW]
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x438]
push ecx
push 0x105
push 0
lea edx, [ebp - 0x22c]
push edx
push 0
call ebx
test eax, eax
je 0x42139e
cmp eax, 0x105
jb 0x4213be
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x438]
push ecx
push 0x105
push 0x4c0930
lea edx, [ebp - 0x22c]
push edx
push 0
call ebx
test eax, eax
je 0x4213c9
cmp eax, 0x105
jb 0x4213d2
xor eax, eax
mov word [ebp - 0x438], ax
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4213e2
push eax
call fcn.00441300
add esp, 4
cmp word [ebp - 0x438], 0
lea ecx, [ebp - 0x438]
jne 0x4213f8
lea ecx, [ebp - 0x640]
mov eax, dword [ebp - 8]
mov edx, dword [eax]
push 0
push ecx
push eax
mov eax, dword [edx + 0x44]
call eax
lea ecx, [ebp - 0x640]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x421435
cmp eax, 0x104
jae 0x421435
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov edx, dword [edx + 0x24]
lea ecx, [ebp - 0x640]
push ecx
push eax
call edx
test edi, edi
jl 0x421505
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x2c]
call eax
mov edi, eax
test edi, edi
jl 0x421505
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
lea edx, [ebp + 8]
push edx
push 0x4cd194
push eax
mov eax, dword [ecx]
call eax
mov edi, eax
test edi, edi
jl 0x421505
mov edx, dword [ebp + 0x10]
xor eax, eax
mov ecx, 8
push edx
mov word [ebp - 0x20], cx
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
lea edx, [ebp - 0x20]
push edx
push 0x4e5be8
push eax
mov eax, dword [ecx + 0x18]
call eax
mov edi, eax
test edi, edi
jl 0x4214d8
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push eax
call edx
mov edi, eax
test edi, edi
jl 0x4214d8
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push edx
push 0x4cd184
push eax
mov eax, dword [ecx]
call eax
mov edi, eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp + 8]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
jmp 0x421505
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x421503
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
test esi, esi
je 0x42151d
push esi
call fcn.00441300
add esp, 4
pop esi
pop ebx
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
mov eax, 0x80070057
pop edi
mov esp, ebp
pop ebp
ret