Function at 0x503280
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10c
push ebx
push esi
push edi
xor eax, eax
mov ecx, 0x41
mov edi, 0x78f818
rep stosd dword es:[edi], eax
mov ecx, 0x41
mov edi, 0x78f920
rep stosd dword es:[edi], eax
mov ecx, 0x41
mov edi, 0x78fa28
xor ebx, ebx
rep stosd dword es:[edi], eax
xor esi, esi
lea esp, [esp]
push esi
mov ecx, 0x78fb30
call fcn.005030a0
mov edi, eax
xor eax, eax
inc esi
cmp esi, 5
mov ecx, 0x41
rep stosd dword es:[edi], eax
jl 0x5032c0
push 0x78f818
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x503307
push 0x5d7844
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x14
call fcn.0055a7d2
push 0x78f818
call fcn.00502e70
mov al, byte [ebp + 8]
add esp, 4
cmp al, bl
jne 0x503373
mov edx, dword [ebp + 0xc]
cmp edx, ebx
je 0x5033f4
mov eax, edx
lea esi, [eax + 1]
jmp 0x503330
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x503330
sub eax, esi
mov dword [esp + 0xc], eax
je 0x5033f4
xor eax, eax
push edx
mov ecx, 0x41
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push str._s_s
push 0x103
push 0x78f920
call fcn.0055b253
add esp, 0x14
mov byte [0x78fa23], bl
push 0x78f920
call fcn.00502e70
mov al, byte [ebp + 8]
add esp, 4
cmp al, bl
jne 0x5034c8
push str.Automap
push 0x5c
push 0x78f920
push str._s_c_s
lea ecx, [esp + 0x20]
push 0x104
push ecx
call fcn.0055b253
lea edx, [esp + 0x28]
push ebx
push edx
mov byte [esp + 0x133], bl
call fcn.0055b92a
add esp, 0x20
test eax, eax
je 0x5034c8
lea eax, [esp + 0x10]
push eax
call fcn.0055b9cd
add esp, 4
test eax, eax
je 0x5034c8
push 0x5d7844
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x14], 0x17
call fcn.0055a7d2
call fcn.00502ec0
test al, al
je 0x50341e
push 0x78f818
push 0x5b6854
push 0x104
push 0x78f920
call fcn.0055b253
add esp, 0x10
jmp 0x50336d
push 1
push 0x1a
lea edx, [esp + 0x18]
push edx
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x1c]
push ebx
rep stosd dword es:[edi], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x503456
push 0x5d7844
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x16
call fcn.0055a7d2
lea ecx, [esp + 0x10]
push ecx
call fcn.00502e70
push str.Tibia
push 0x5c
lea edx, [esp + 0x1c]
push edx
push str._s_c_s
push 0x104
push 0x78f920
call fcn.0055b253
push ebx
push 0x78f920
mov byte [0x78fa23], bl
call fcn.0055b92a
add esp, 0x24
test eax, eax
je 0x503373
push 0x78f920
call fcn.0055b9cd
add esp, 4
test eax, eax
je 0x503373
push 0x5d7844
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x17
call fcn.0055a7d2
xor eax, eax
lea edx, [esp + 0x10]
mov ecx, 0x25
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
push edx
mov dword [esp + 0x14], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x50352f
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x5034f9
cmp eax, 1
jne 0x50352f
push 0x78f818
push 0x5b6854
push 0x104
push 0x78fa28
call fcn.0055b253
add esp, 0x10
mov byte [0x78fb2b], bl
push 0x78fa28
call fcn.00502e70
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
push 0x23
push 0x78fa28
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jne 0x50351b
push 0x5d7844
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x15
call fcn.0055a7d2
int3