Function at 0x498510
Capabilities:
Get geographical location

Disassembly:
sub esp, 0x58
mov eax, dword [0x4d9540]
push ebx
push ebp
mov ebp, dword [esp + 0x68]
push esi
push edi
test ebp, ebp
mov dword [esp + 0x10], eax
je 0x498575
mov ecx, ebp
shr ecx, 0x10
jne 0x498543
mov edx, ebp
lea ecx, [esp + 0x10]
and edx, 0xffff
push edx
call fcn.0040ff70
jmp 0x498575
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x498575
push esi
lea ecx, [esp + 0x14]
call fcn.004012f0
test eax, eax
je 0x498575
mov edi, dword [esp + 0x10]
lea ecx, [esi + esi]
mov eax, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x50]
xor edx, edx
rep stosd dword es:[edi], eax
mov ecx, dword [0x4d9608]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov eax, dword [0x4d9e7c]
mov dword [esp + 0x14], ecx
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov dword [esp + 0x20], edx
xor ecx, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x2c], ecx
lea edx, [esp + 0x14]
mov dword [esp + 0x30], ecx
push 0x13
push edx
mov dword [esp + 0x3c], ecx
push 0xe
push 0x400
mov dword [esp + 0x38], eax
mov dword [esp + 0x48], ecx
call esi
lea eax, [esp + 0x14]
mov dword [esp + 0x60], 0x4e3a2c
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x78]
test eax, eax
je 0x4985ff
lea ecx, [esp + 0x28]
push 0x13
push ecx
push 0xf
push 0x400
call esi
lea edx, [esp + 0x28]
mov dword [esp + 0x60], edx
lea eax, [esp + 0x3c]
push 0x13
push eax
push 0x12
push 0x400
call esi
lea ecx, [esp + 0x3c]
push ecx
call fcn.004c553e
add esp, 4
lea edx, [esp + 0x3c]
mov dword [esp + 0x54], eax
push 0x13
push edx
push 0x10
push 0x400
call esi
lea eax, [esp + 0x3c]
push eax
call fcn.004c553e
add esp, 4
lea ecx, [esp + 0x3c]
mov dword [esp + 0x58], eax
push 0x13
push ecx
push 0x1010
push 0x400
call esi
lea edx, [esp + 0x3c]
push edx
call fcn.004c553e
mov esi, dword [esp + 0x78]
add esp, 4
cmp esi, 0xffffffff
mov dword [esp + 0x64], eax
jne 0x49872f
mov eax, dword [0x4d9540]
lea ecx, [esp + 0x14]
test ecx, ecx
mov dword [esp + 0x70], eax
je 0x4986d9
lea edx, [esp + 0x14]
shr edx, 0x10
jne 0x4986a1
xor eax, eax
lea ecx, [esp + 0x14]
mov ax, cx
lea ecx, [esp + 0x70]
push eax
call fcn.0040ff70
jmp 0x4986d9
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x4986d9
push esi
lea ecx, [esp + 0x74]
call fcn.004012f0
test eax, eax
je 0x4986d9
mov edi, dword [esp + 0x70]
lea ecx, [esi + esi]
mov eax, ecx
lea esi, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push 0
push ecx
lea ecx, [esp + 0x18]
call fcn.00401a30
mov ecx, dword [esp + 0x70]
cmp eax, 0xffffffff
jne 0x4986f6
xor esi, esi
jmp 0x498704
mov edx, dword [esp + 0x10]
mov edi, dword [ecx - 8]
mov esi, dword [edx - 8]
sub esi, edi
sub esi, eax
mov edx, dword [0x4d9544]
lea eax, [ecx - 0xc]
cmp eax, edx
je 0x49872f
add ecx, 0xfffffff4
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x49872f
mov ecx, dword [esp + 0x70]
add ecx, 0xfffffff4
push ecx
call fcn.004c5432
add esp, 4
push ebp
mov dword [esp + 0x54], esi
call fcn.004c5da8
lea esi, [eax + eax*2 + 0x64]
lea edx, [esi + esi]
push edx
call fcn.004c58a5
add esp, 8
dec esi
mov ebx, eax
lea eax, [esp + 0x50]
push esi
push ebx
push eax
push ebp
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_GetNumberFormatW]
test eax, eax
je 0x4987c7
test ebx, ebx
jne 0x49876d
xor ebp, ebp
jmp 0x498776
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
mov edi, dword [esp + 0x10]
cmp dword [edi - 0xc], 1
jg 0x498785
cmp ebp, dword [edi - 4]
jle 0x4987a0
lea ecx, [esp + 0x10]
call fcn.0040e950
push ebp
lea ecx, [esp + 0x14]
call fcn.004012f0
test eax, eax
je 0x4987c7
mov edi, dword [esp + 0x10]
lea eax, [ebp + ebp]
mov esi, ebx
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov dword [ecx - 8], ebp
mov edx, dword [esp + 0x10]
mov word [eax + edx], 0
test ebx, ebx
je 0x4987d4
push ebx
call fcn.004c5432
add esp, 4
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x6c]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
test edx, edx
jl 0x4987f1
push ecx
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x49883b
mov ecx, dword [0x4d9540]
mov esi, eax
test eax, eax
mov dword [ebx], ecx
jne 0x498803
xor ebp, ebp
jmp 0x49880c
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
push ebp
mov ecx, ebx
call fcn.00401420
test eax, eax
je 0x49883b
mov edi, dword [ebx]
lea eax, [ebp + ebp]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov dword [ecx - 8], ebp
mov edx, dword [ebx]
mov word [edx + eax], 0
mov eax, dword [esp + 0x10]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x49886a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x49886a
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x58
ret