Function at 0x402930
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4d04ec
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c0
push ebx
push ebp
push esi
push edi
push 0
mov ebx, ecx
push str.char
lea eax, [esp + 0x18]
push str.agent
push eax
mov ecx, 0x515e40
call fcn.004c160b
lea esi, [ebx + 0x2c]
push eax
mov ecx, esi
mov dword [esp + 0x5dc], 0
call fcn.004a92a2
or ebp, 0xffffffff
lea ecx, [esp + 0x10]
mov dword [esp + 0x5d8], ebp
call fcn.004a9169
mov ecx, dword [esi]
mov eax, dword [ecx - 8]
test eax, eax
jne 0x402ab1
lea ecx, [esp + 0x18]
call fcn.0042f5c6
lea edx, [esp + 0x184]
push 0x104
push edx
mov dword [esp + 0x5e0], 1
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
test eax, eax
jne 0x4029f0
push eax
push eax
push 0x50d44c
call fcn.004affba
lea ecx, [esp + 0x18]
mov dword [esp + 0x5d8], ebp
call fcn.0042f603
xor eax, eax
jmp 0x402bf8
lea eax, [esp + 0x184]
lea ecx, [esp + 0x10]
push eax
call fcn.004a91d7
push str.MsagentChars.acs
lea ecx, [esp + 0x14]
mov byte [esp + 0x5dc], 2
call fcn.004a9545
mov ecx, dword [esp + 0x10]
push 0
push ecx
lea ecx, [esp + 0x20]
call fcn.0042f689
test eax, eax
je 0x402a87
lea ecx, [esp + 0x18]
call fcn.0042f8a9
lea ecx, [esp + 0x18]
mov edi, eax
call fcn.0042f870
test eax, eax
jne 0x402a83
mov edx, dword [esp + 0x18]
push 0x10
lea ecx, [esp + 0x1c]
call dword [edx + 0x38]
test eax, eax
jne 0x402a83
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
call fcn.0042f978
push eax
mov ecx, esi
mov byte [esp + 0x5dc], 3
call fcn.004a92a2
lea ecx, [esp + 0x14]
mov byte [esp + 0x5d8], 2
call fcn.004a9169
test edi, edi
jne 0x402a2b
lea ecx, [esp + 0x18]
call fcn.0042f63f
lea ecx, [esp + 0x10]
mov byte [esp + 0x5d8], 1
call fcn.004a9169
lea ecx, [esp + 0x18]
mov dword [esp + 0x5d8], ebp
call fcn.0042f603
mov eax, dword [esi]
lea ecx, [esp + 0x288]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_FindClose]
jne 0x402b62
push eax
call ebp
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0x34]
mov byte [esp + 0x80], al
rep stosd dword es:[edi], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x34]
lea edx, [esp + 0x80]
push eax
mov dword [esp + 0x38], 0x4c
mov dword [esp + 0x74], str..acs
mov dword [esp + 0x68], 0x50d40c
mov dword [esp + 0x6c], 4
mov dword [esp + 0x44], str.Agent_Characters_.acs_
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0x104
call dword [sym.imp.comdlg32.dll_GetOpenFileNameA]
test eax, eax
je 0x402bc4
lea ecx, [esp + 0x80]
push ecx
mov ecx, esi
call fcn.004a92f2
mov eax, dword [esi]
lea edx, [esp + 0x288]
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_FindFirstFileA]
cmp eax, 0xffffffff
je 0x402ad0
push eax
call ebp
mov eax, dword [esi]
mov ecx, 0x515e40
push eax
push str.char
push str.agent
call fcn.004afd64
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov edx, dword [esi]
mov edi, eax
lea ecx, [esp + 0x3c8]
push edi
push ecx
push 0xffffffffffffffff
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov eax, dword [ebx + 0x28]
mov ecx, dword [ebx + 0x24]
push eax
lea edx, [esp + 0x3cc]
push ecx
push edx
mov ecx, ebx
mov word [esp + edi*2 + 0x3d4], 0
call fcn.00402c20
test eax, eax
jne 0x402bc8
xor eax, eax
jmp 0x402bf8
mov cl, byte [ebx + 0x30]
lea eax, [ebx + 0x30]
test cl, cl
jne 0x402bda
push eax
mov ecx, ebx
call fcn.00402d70
mov ecx, ebx
call fcn.00402f60
mov eax, dword [esp + 0x5e0]
test eax, eax
je 0x402bf3
mov ecx, ebx
call fcn.00402f90
mov eax, 1
mov ecx, dword [esp + 0x5d0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x5cc
ret 4