Function at 0x521d54
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbf0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x410], eax
mov dword [ebp - 0x408], eax
xor eax, eax
push ebp
push 0x52205b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5355e0]
mov al, byte [eax]
mov byte [0x534f24], al
mov eax, dword [0x5353cc]
mov al, byte [eax]
mov byte [0x534f28], al
mov eax, dword [0x53544c]
mov al, byte [eax]
mov byte [0x534f2c], al
mov eax, dword [0x5355d4]
mov al, byte [eax]
mov byte [0x534f30], al
mov eax, dword [0x5351bc]
mov al, byte [eax]
mov byte [0x534f34], al
push 0x52206c
push 0x52207c
call sub.kernel32.dll_GetModuleHandleA_2
push eax
call sub.kernel32.dll_GetProcAddress_1
mov ebx, eax
test ebx, ebx
je 0x521df5
lea eax, [ebp - 0x40c]
push eax
call sub.kernel32.dll_GetCurrentProcess
push eax
call ebx
test eax, eax
je 0x521df5
cmp dword [ebp - 0x40c], 1
sbb eax, eax
inc eax
mov byte [0x534f38], al
mov eax, dword [0x53522c]
mov al, byte [eax]
mov byte [0x534f3c], al
mov eax, dword [0x5353dc]
mov al, byte [eax]
mov byte [0x534f40], al
mov eax, dword [0x53552c]
mov al, byte [eax]
mov byte [0x534f44], al
mov eax, dword [0x5356fc]
mov al, byte [eax]
mov byte [0x534f48], al
mov eax, dword [0x535098]
mov al, byte [eax]
mov byte [0x534f4c], al
mov eax, dword [0x5354f0]
mov al, byte [eax]
mov byte [0x534f50], al
mov eax, dword [0x535724]
mov al, byte [eax]
mov byte [0x534f54], al
mov eax, dword [0x53554c]
mov al, byte [eax]
mov byte [0x534f58], al
mov eax, dword [0x535458]
mov al, byte [eax]
mov byte [0x534f5c], al
mov eax, dword [0x535358]
mov al, byte [eax]
mov byte [0x534f60], al
mov eax, dword [0x535104]
mov al, byte [eax]
mov byte [0x534f64], al
mov eax, dword [0x535128]
mov al, byte [eax]
mov byte [0x534f68], al
mov eax, dword [0x535050]
mov al, byte [eax]
mov byte [0x534f6c], al
mov eax, dword [0x53570c]
mov al, byte [eax]
mov byte [0x534f70], al
mov eax, dword [0x535120]
mov al, byte [eax]
mov byte [0x534f74], al
mov eax, dword [0x535854]
mov al, byte [eax]
mov byte [0x534f78], al
mov eax, dword [0x535478]
mov al, byte [eax]
mov byte [0x534f7c], al
mov eax, dword [0x5352c4]
mov al, byte [eax]
mov byte [0x534f80], al
mov eax, dword [0x535248]
mov al, byte [eax]
mov byte [0x534f84], al
mov eax, dword [0x534fd4]
mov al, byte [eax]
mov byte [0x534f8c], al
mov eax, dword [0x535084]
mov al, byte [eax]
mov byte [0x534f90], al
mov eax, dword [0x5357a4]
mov al, byte [eax]
mov byte [0x534f94], al
mov eax, 0x53ab2c
call fcn.00404744
xor ebx, ebx
xor edx, edx
push ebp
push 0x521fee
push dword fs:[edx]
mov dword fs:[edx], esp
push ebp
call fcn.00521c54
pop ecx
test al, al
je 0x521fe4
lea eax, [ebp - 0x410]
lea edx, [ebp - 0x401]
mov ecx, 0x401
call fcn.004049c4
mov edx, dword [ebp - 0x410]
mov eax, 0x53ab2c
mov ecx, 0x522094
call fcn.00404a60
mov byte [ebp - 0x402], 0
mov eax, dword [0x53ab2c]
call fcn.0040a1b8
test al, al
je 0x521f6f
mov byte [ebp - 0x402], 1
jmp 0x521f84
mov eax, dword [0x53ab2c]
call fcn.0040a7e0
test al, al
je 0x521f84
mov byte [ebp - 0x402], 1
cmp byte [ebp - 0x402], 0
je 0x521fe2
lea eax, [ebp - 0x408]
mov ecx, 0x5220b0
mov edx, dword [0x53ab2c]
call fcn.00404a60
push 0
push 0x4000100
push 1
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x408]
call fcn.00404c14
push eax
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
jne 0x521fcf
mov bl, 1
jmp 0x521fe4
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x408]
call fcn.0040a418
jmp 0x521fe4
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521ffa
test bl, bl
je 0x522037
mov eax, 0x53ab2c
call fcn.00404744
mov eax, 0x53ab2c
mov edx, 0x105
call fcn.00404da4
mov eax, dword [0x53ab2c]
call fcn.00404c14
push eax
push 0x104
call sub.kernel32.dll_GetTempPathA
mov edx, 0x53ab2c
xchg edx, eax
call fcn.00404da4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x522062
lea eax, [ebp - 0x410]
call fcn.00404744
lea eax, [ebp - 0x408]
call fcn.00404744
ret