Function at 0x561290
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0xcc
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x561430
jb 0x5613d0
cmp eax, 2
jne 0x5613b4
lea eax, [ebp - 0x98]
mov dword [esp + 0xc], 0x40
mov dword [esp + 4], 0x1008
mov dword [ebp - 0xa4], 0x40
mov dword [ebp - 0xa8], 0x40
mov dword [esp + 8], eax
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov dword [ebp - 0xc0], eax
call eax
sub esp, 0x10
test eax, eax
je 0x561381
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp - 0xbc]
lea esi, [ebp - 0xac]
mov dword [esp + 8], 0xffffffff
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.005b01a0
mov dword [esp], esi
mov ecx, ebx
call fcn.005cfa30
mov eax, dword [ebp - 0xac]
sub esp, 4
mov edx, dword [eax]
test edx, edx
je 0x5614d2
cmp edx, 0xffffffff
je 0x561367
lock sub dword [eax], 1
mov eax, dword [ebp - 0xac]
je 0x5614d2
mov eax, dword [ebp - 0xa0]
lea edi, [ebp - 0x98]
cmp eax, edi
je 0x5613c1
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x5613c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0xa0]
cmp eax, 0x7a
mov dword [ebp - 0xbc], edi
je 0x5614f0
mov eax, dword [ebp - 0xbc]
lea edi, [ebp - 0x98]
cmp eax, edi
je 0x5613b4
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [ebx + 8], 0x80000000
mov dword [ebx], 0
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 8
lea eax, [ebp - 0xa8]
mov dword [esp + 0xc], 9
mov dword [esp + 4], 0x15
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
sub esp, 0x10
test eax, eax
je 0x5613b4
lea esi, [ebp - 0xac]
lea eax, [ebp - 0xa8]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005b01a0
mov dword [esp], esi
mov ecx, ebx
call fcn.005cfa30
jmp 0x56148d
lea eax, [ebp - 0xa8]
mov dword [esp + 0xc], 0xd
mov dword [esp + 4], 0x14
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
sub esp, 0x10
test eax, eax
je 0x5613b4
lea esi, [ebp - 0xac]
lea eax, [ebp - 0xa8]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005b01a0
mov dword [esp], esi
mov ecx, ebx
call fcn.005cfa30
mov eax, dword [ebp - 0xac]
sub esp, 4
mov edx, dword [eax]
test edx, edx
je 0x5614b5
cmp edx, 0xffffffff
je 0x5613c1
lock sub dword [eax], 1
mov eax, dword [ebp - 0xac]
jne 0x5613c1
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.004a4c50
jmp 0x5613c1
mov dword [esp + 8], 4
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.004a4c50
jmp 0x561367
mov edi, dword [ebp - 0xa4]
mov eax, 0xff
cmp edi, 0x100
cmovl eax, edi
cmp dword [ebp - 0xa8], 0xfe
mov dword [ebp - 0xc4], eax
jle 0x561566
mov eax, dword [ebp - 0xbc]
mov dword [esp + 0xc], 0xff
mov dword [esp + 4], 0x1008
mov dword [ebp - 0xa4], 0xff
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [ebp - 0xc0]
call eax
mov esi, dword [ebp - 0xa0]
sub esp, 0x10
test eax, eax
mov dword [ebp - 0xbc], esi
je 0x56139c
jmp 0x561315
mov dword [esp], 0x1fe
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebp - 0xc8], eax
je 0x561656
mov eax, dword [ebp - 0xc4]
mov esi, dword [ebp - 0xc8]
mov dword [ebp - 0xa8], 0xff
mov dword [ebp - 0xa4], 0
add eax, eax
mov dword [ebp - 0xa0], esi
cmp eax, 4
jae 0x561610
test eax, eax
je 0x5615c0
mov edx, dword [ebp - 0xbc]
test al, 2
movzx edx, byte [edx]
mov byte [esi], dl
jne 0x56162a
lea esi, [ebp - 0x98]
cmp dword [ebp - 0xbc], esi
mov eax, dword [ebp - 0xc4]
mov dword [ebp - 0xa4], eax
je 0x561645
mov eax, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xc8]
cmp eax, edx
je 0x561516
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xbc], eax
jmp 0x561516
mov edi, esi
mov esi, dword [ebp - 0xbc]
lea ecx, [eax - 1]
shr ecx, 2
mov edx, dword [esi + eax - 4]
mov dword [edi + eax - 4], edx
rep movsd dword es:[edi], dword [esi]
jmp 0x5615c0
mov edx, dword [ebp - 0xbc]
mov esi, dword [ebp - 0xc8]
movzx edx, word [edx + eax - 2]
mov word [esi + eax - 2], dx
jmp 0x5615c0
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0xbc], eax
jmp 0x561516
call fcn.0071fff4
jmp 0x561580