Function at 0x4591d0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x530
mov eax, dword [0x52efc0]
mov edi, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp dword [0x531d08], 0
je 0x459292
mov eax, dword [ebp + 0xc]
test edi, edi
je 0x459205
mov ecx, dword [0x531d08]
mov dword [edi], ecx
mov ecx, dword [ebp + 0x10]
test eax, eax
je 0x459214
mov edx, dword [0x531d0c]
mov dword [eax], edx
mov edx, dword [ebp + 0x14]
test ecx, ecx
je 0x459222
mov eax, dword [0x531d10]
mov dword [ecx], eax
mov eax, dword [ebp + 0x18]
test edx, edx
je 0x459231
mov ecx, dword [0x531d14]
mov dword [edx], ecx
mov esi, dword [ebp + 0x20]
test eax, eax
je 0x459250
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x459250
push 0xffffffffffffffff
push 0x531d18
push ecx
push eax
call fcn.004cfd44
add esp, 0x10
mov eax, dword [ebp + 0x24]
test esi, esi
je 0x459261
movzx ecx, word [0x531f20]
mov word [esi], cx
mov ecx, dword [ebp + 0x28]
test eax, eax
je 0x459272
movzx edx, word [0x531f22]
mov word [eax], dx
test ecx, ecx
je 0x45927d
mov al, byte [0x531f24]
mov byte [ecx], al
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004aeb01
add esp, 0x530
pop esi
pop edi
pop ebx
pop ebp
ret
lea ebx, [ebp - 0x218]
push 0x208
push 0
push ebx
call fcn.004b81d0
add esp, 0xc
push 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea esi, [ebp - 0x420]
push 0x208
push 0
push esi
call fcn.004b81d0
add esp, 0xc
push 0xffffffffffffffff
push 0x4e34e0
push ebx
push str._s_s
push 0x103
push esi
call fcn.00402ca2
add esp, 0x18
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x459381
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x45939b
mov esi, eax
lea eax, [ebp - 0x538]
push 0x110
push 0
push eax
call fcn.004b81d0
add esp, 0xc
lea eax, [ebp - 0x53c]
mov dword [ebp - 0x53c], 0x114
push eax
call esi
mov eax, dword [ebp - 0x538]
test eax, eax
je 0x45939b
mov dword [0x531d08], eax
mov eax, dword [ebp - 0x534]
mov ecx, dword [ebp - 0x530]
mov dword [0x531d0c], eax
mov eax, dword [ebp - 0x52c]
mov dword [0x531d10], ecx
mov dword [0x531d14], eax
lea eax, [ebp - 0x528]
push 0xffffffffffffffff
push eax
push 0x104
push 0x531d18
call fcn.004cfd44
add esp, 0x10
jmp 0x45939b
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x45939b
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
jne 0x4592f4
lea eax, [ebp - 0x538]
push 0x118
push 0
push eax
call fcn.004b81d0
add esp, 0xc
lea eax, [ebp - 0x53c]
mov dword [ebp - 0x53c], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4591f6
cmp dword [0x531d08], 0
je 0x4593e8
cmp byte [0x531f24], 0
jne 0x4591f6
jmp 0x459424
mov ecx, dword [ebp - 0x534]
mov eax, dword [ebp - 0x538]
mov edx, dword [ebp - 0x530]
mov dword [0x531d0c], ecx
mov ecx, dword [ebp - 0x52c]
mov dword [0x531d08], eax
mov dword [0x531d10], edx
mov dword [0x531d14], ecx
cmp byte [0x531f24], 0
jne 0x4591f6
movzx ecx, word [ebp - 0x426]
movzx eax, word [ebp - 0x428]
mov word [0x531f22], cx
mov cl, byte [ebp - 0x422]
mov word [0x531f20], ax
mov byte [0x531f24], cl
jmp 0x4591f6