Function at 0x489502
Capabilities:
Get common file path
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
push ebx
push esi
push edi
push 0xe26908
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x59
pop edi
push 0x524440
push 0x74c
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
movzx ecx, byte [0x522e70]
mov ebx, 0xffff0bdd
mov edx, dword [0x50a5bc]
cmp ecx, 0x4294a
mov ecx, eax
cmove edx, ebx
mov dword [0x50a5bc], edx
call fcn.00489450
mov ecx, dword [0x50a5b0]
mov ebx, eax
add ecx, 0xfffde02d
lea edx, [ebx + ebx]
sub edx, dword [0x50a5bc]
add edx, ecx
movzx ecx, byte [0x522e7a]
dec ecx
je 0x489589
sub ecx, 0x2b
je 0x489594
sub ecx, 0x67
je 0x489594
lea edi, [edx - 0xf523]
jmp 0x489594
mov edi, dword [0x50a5c0]
sub edi, edx
add edi, 0x5f
push 0x10
movzx eax, bl
mov ecx, ebx
pop esi
sub esi, eax
mov eax, dword [esp + 0x28]
mov dword [0x50a5bc], esi
sub esi, dword [esp + 0x14]
mov dword [0x50a5b0], eax
add esi, 0x1d
call fcn.00488def
mov ecx, dword [ebp + 0xc]
mov ebx, eax
sub ecx, edi
mov dword [esp + 0xc], ebx
add ecx, 0x41
mov dword [0x50a5c0], ecx
sub ecx, ebx
add ecx, 0x5f
push esi
push ecx
mov dword [0x50a5bc], ecx
mov esi, 0x5233b8
push ecx
mov ecx, esi
call fcn.00489887
mov edx, 0x524440
mov ecx, eax
call fcn.0048b375
mov edx, str.Station
mov ecx, eax
call fcn.0048b375
pop ecx
mov ecx, eax
call fcn.00489887
mov eax, dword [0x50a5c0]
mov ecx, eax
sub ecx, edi
sub ecx, 0xf423
push ebx
push ecx
mov dword [esp + 0x18], ecx
mov ecx, esi
push eax
call fcn.00489887
pop ecx
mov ecx, eax
call fcn.00489887
movzx eax, byte [0x522e79]
mov ecx, dword [0x50a5bc]
mov ebx, dword [0x50a5c0]
cmp eax, ecx
jbe 0x489649
sub byte [0x522e73], bl
movzx eax, byte [0x522e70]
cmp eax, 0x4294a
mov eax, 0xffff0bdd
push 8
cmove ecx, eax
mov dword [0x50a5bc], ecx
pop eax
sub byte [eax + 0x522e70], bl
dec eax
cmp eax, 4
jg 0x489666
movzx edx, byte [0x522e79]
mov dword [0xe2692c], eax
mov al, byte [0x522e73]
cmp edx, dword [esp + 0xc]
jbe 0x489690
sub al, cl
mov byte [0x522e73], al
cmp edx, ecx
jbe 0x48969b
sub al, bl
mov byte [0x522e73], al
call fcn.004890ce
push dword [esp + 0xc]
mov edi, eax
mov eax, dword [0x50a5c0]
movzx edx, al
mov esi, edi
sub esi, edx
push ecx
sub esi, 0x4e
mov ecx, 0x5233b8
push eax
mov dword [0x50a5bc], esi
call fcn.00489887
pop ecx
mov ecx, eax
call fcn.00489887
movzx ecx, byte [0x522e77]
movzx eax, byte [0x522e73]
sub ecx, eax
cmp ecx, 0x5cfa
mov ecx, dword [0x50a5c0]
jne 0x4896fa
mov edi, ecx
sub edi, dword [0x50a5bc]
add edi, 0x41
jmp 0x489709
mov al, cl
sub al, byte [0x50a5bc]
add al, 0x41
mov byte [0x522e74], al
movzx eax, cl
mov ecx, edi
sub ecx, eax
sub ecx, 0x4e
mov dword [0x50a5bc], ecx
call fcn.0040199a
mov esi, dword [0x50a5b0]
movzx ecx, byte [0x522e76]
mov ebx, dword [0x50a5bc]
cmp ecx, esi
movzx edx, byte [0x522e75]
movzx eax, bl
cmovb edx, eax
sub esi, ebx
sub esi, 0xf423
mov byte [0x522e75], dl
mov dword [0x50a5bc], esi
mov esi, dword [esp + 0x10]
sub esi, edi
push 0xe26930
push 0x74c
lea eax, [esi + 0x5f]
mov dword [0x50a5b0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
movzx edx, byte [0x522e76]
mov ebx, eax
movzx eax, byte [0x522e75]
cmp edx, edi
movzx ecx, bl
cmovb eax, ecx
cmp dword [0x50a5c0], 0x588f6540
mov byte [0x522e75], al
jne 0x4897a0
mov eax, 0xce999d31
sub edi, ebx
lea eax, [esi + 0x41]
add edi, 0x41
mov dword [0x50a5b0], eax
mov ecx, ebx
mov dword [0x50a5bc], edi
call fcn.00488def
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc