Function at 0x10016568
Capabilities:
Get geographical location
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
push ebx
push esi
mov dword [ebp - 0x44], edx
mov esi, ecx
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x20], 0x862f
mov byte [ebp - 1], cl
push edi
cmp byte [ebp - 1], cl
je 0x1001659b
push ecx
push 0x10e6
call dword [sym.imp.GDI32.dll_CreateHatchBrush]
xor ecx, ecx
mov edi, dword [sym.imp.USER32.dll_GetDC]
mov ebx, dword [sym.imp.USER32.dll_GetDesktopWindow]
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x100165bf
push ecx
call ebx
push eax
call edi
push eax
call dword [sym.imp.GDI32.dll_SelectClipRgn]
xor ecx, ecx
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 8], 0x7e2799ac
mov dword [ebp - 8], ecx
jmp 0x10016603
mov dword [ebp - 0x18], 0xfd4914d2
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x100165fd
push 0x10c9
push ecx
push ecx
push 0x1423
push ecx
call ebx
push eax
call edi
push eax
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
xor ecx, ecx
mov eax, dword [ebp - 0x18]
inc dword [ebp - 8]
cmp dword [ebp - 8], 0xe
jle 0x100165d2
push ecx
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push 0x5912
push eax
call fcn.10018433
add esp, 0x10
mov dword [ebp - 0x2c], 0xffffffea
cmp dword [ebp - 0x2c], 0x17
push 2
pop edx
jne 0x1001667d
xor ecx, ecx
mov dword [ebp - 8], ecx
jmp 0x10016644
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x7c], 0x405b4019
inc dword [ebp - 8]
cmp dword [ebp - 8], edx
jl 0x10016636
mov dword [ebp - 0x30], ecx
jmp 0x1001666c
mov dword [ebp - 8], ecx
mov dword [ebp - 8], ecx
jmp 0x10016664
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x7c], 0x2e6e7f73
inc dword [ebp - 8]
cmp dword [ebp - 8], edx
jl 0x10016656
inc dword [ebp - 0x30]
cmp dword [ebp - 0x30], 1
jne 0x1001664e
inc dword [ebp - 0x2c]
cmp dword [ebp - 0x2c], 0x17
je 0x10016631
jmp 0x1001667f
xor ecx, ecx
mov dword [ebp - 0x10], 7
mov dword [ebp - 0x1c], 0xcbbbc25
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], 0x8607
mov dword [ebp - 0x18], 0xf4846e1d
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0xffffffea
jne 0x10016810
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x40], 0x6e85fcb
mov dword [ebp - 0xc], ecx
jmp 0x100166ed
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x100166d1
push ecx
push 0x250d
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
xor ecx, ecx
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x100166ea
push 0x251
push ecx
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
xor ecx, ecx
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 6
jge 0x100166ba
mov dword [ebp - 0xc], 9
jmp 0x100167f6
mov dword [ebp - 8], 0x272a727
mov dword [ebp - 0x3c], 4
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], 0x70fc
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x10016729
push ecx
call dword [sym.imp.USER32.dll_SetCursor]
xor ecx, ecx
mov dword [ebp - 8], 0xffffffeb
jmp 0x100167e6
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], 0x2305aba9
cmp dword [ebp - 0x3c], 0x1ec2
jne 0x100167b1
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
neg eax
sub edx, eax
mov eax, dword [ebp - 0x40]
neg edx
sbb edx, edx
xor ecx, ecx
inc edx
cmp edx, eax
setg cl
imul ecx, dword [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x1c], eax
jge 0x10016786
cmp dword [ebp - 0x14], 0
jne 0x10016786
xor eax, eax
jmp 0x10016789
xor eax, eax
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x1001679d
cmp dword [ebp - 0x20], 0
je 0x1001679d
xor edx, edx
inc edx
jmp 0x1001679f
xor edx, edx
mov eax, dword [ebp - 0x18]
xor ecx, ecx
cmp edx, eax
setl cl
cmp ecx, dword [ebp - 0xc]
jl 0x100167b1
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
xor ecx, ecx
test eax, eax
push 0
sets cl
xor edx, edx
cmp ecx, 0xfffffff6
setle dl
sub edx, dword [ebp - 0x14]
neg edx
sbb edx, edx
inc edx
sub edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
neg edx
sbb edx, edx
xor ecx, ecx
inc edx
cmp edx, eax
setle cl
mov dword [ebp - 0x18], ecx
inc dword [ebp - 8]
pop ecx
cmp dword [ebp - 8], 0xfffffffb
jge 0x10016735
dec dword [ebp - 0xc]
push 0
pop ecx
cmp dword [ebp - 0xc], 4
jle 0x100166ff
dec dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xffffffea
push 0
pop ecx
je 0x100166ab
cmp dword [esi + 0x10], ecx
jne 0x1001681c
xor al, al
jmp 0x10016c95
mov eax, dword [ebp - 0x44]
push 3
pop edx
mov dword [eax], ecx
mov dword [ebp - 0x20], 0x37bc7528
mov dword [ebp - 0x18], 0x5f4b
mov dword [ebp - 0x20], 1
mov dword [ebp - 8], ecx
jmp 0x1001684b
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0xa0], edx
inc dword [ebp - 8]
cmp dword [ebp - 8], edx
jl 0x1001683e
dec dword [ebp - 0x18]
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x10016863
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [esi + 0x14], 0x10
jb 0x1001686d
mov ecx, dword [esi]
jmp 0x1001686f
mov ecx, esi
cmp dword [esi + 0x14], 0x10
mov dword [ebp - 0x38], ecx
jb 0x1001687c
mov edx, dword [esi]
jmp 0x1001687e
mov edx, esi
mov eax, dword [esi + 0x10]
add eax, edx
xor edx, edx
cmp ecx, eax
je 0x10016b41
inc edx
mov dword [ebp - 0x10], 0xffffffff
xor ecx, ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], ecx
jmp 0x100168ad
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x28], 7
inc dword [ebp - 8]
cmp dword [ebp - 8], edx
jl 0x1001689f
mov dword [ebp - 0x10], ecx
jmp 0x100168ce
mov dword [ebp - 0x18], 0xffffffff
dec dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp + eax*4 - 0x28]
mov dword [ebp - 0xc], eax
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], ecx
jle 0x100168b7
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov eax, dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x28]
test eax, eax
mov eax, dword [ebp - 0x28]
setns cl
xor edx, edx
cmp ecx, eax
mov eax, dword [ebp - 0xc]
setne dl
xor ecx, ecx
cmp eax, edx
setge cl
cmp ecx, dword [ebp - 0x28]
je 0x1001691a
push 0x5964
push 0
call fcn.100182bc
pop ecx
pop ecx
xor ecx, ecx
jmp 0x1001694f
xor ecx, ecx
mov byte [ebp - 1], cl
cmp byte [ebp - 1], cl
je 0x10016934
push ecx
push 1
push 0x674
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
xor ecx, ecx
mov dword [ebp - 0xc], ecx
jmp 0x1001694a
call fcn.10016387
mov eax, dword [ebp - 0xc]
mov eax, dword [ebp + eax*4 - 0x28]
inc dword [ebp - 0xc]
xor ecx, ecx
cmp dword [ebp - 0xc], ecx
jle 0x10016939
mov eax, dword [ebp - 0x38]
mov al, byte [eax]
cmp al, 0x30
jl 0x100169d6
cmp al, 0x39
jg 0x100169d6
mov dword [ebp - 0x14], 0x22ba3946
mov dword [ebp - 8], ecx
jmp 0x10016979
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0xb0], 0xffffffff
inc dword [ebp - 8]
cmp dword [ebp - 8], 4
jl 0x10016968
mov dword [ebp - 0x14], 3
cmp dword [ebp - 0x14], ecx
jl 0x100169bc
lea eax, [ebp - 0x22]
mov byte [ebp - 0x22], cl
push eax
push ecx
call fcn.100180b7
push 0x2545
lea eax, [ebp - 0x21]
mov byte [ebp - 0x21], 0
push eax
push 0
push 0x643a
call fcn.1001881b
add esp, 0x18
dec dword [ebp - 0x14]
push 0
pop ecx
jns 0x1001698b
push ecx
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.10018197
mov ecx, dword [ebp - 0x38]
add esp, 0xc
inc ecx
jmp 0x1001686f
mov dword [ebp - 0xc], 0xffffffff
xor esi, esi
mov dword [ebp - 0x10], 0xa906
inc esi
mov dword [ebp - 0x14], 0xfffffffd
mov dword [ebp - 0x20], ecx
mov dword [ebp - 8], ecx
jmp 0x10016a04
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x34], 0xdfddae9
inc dword [ebp - 8]
cmp dword [ebp - 8], esi
jl 0x100169f6
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x10016a1b
push ecx
call fcn.10018129
pop ecx
xor ecx, ecx
cmp dword [ebp - 0xc], ecx
je 0x10016a23
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x10]
je 0x10016b20
mov eax, 0xffbe6269
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], ecx
jl 0x10016b37
push 9
pop edi
mov dword [ebp - 0x20], 0x20a048c8
mov dword [ebp - 0x40], 0xb265d632
mov dword [ebp - 0x18], 4
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x1c], 0xaadaf8d9
mov dword [ebp - 0xc], ecx
jmp 0x10016b0c
mov dword [ebp - 8], 0x7ea4c570
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], ecx
jl 0x10016b09
mov eax, dword [ebp - 0xc]
cmp dword [ebp + eax*4 - 0x34], ecx
je 0x10016ae3
mov eax, dword [ebp - 0xc]
cmp dword [ebp + eax*4 - 0x34], ecx
je 0x10016aaa
mov edx, esi
cmp dword [ebp - 0x74], ecx
jne 0x10016aac
mov edx, ecx
mov eax, dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + eax*4 - 0x34]
mov eax, dword [ebp - 0xc]
imul ecx, dword [ebp + eax*4 - 0x34]
xor eax, eax
cmp edx, ecx
setge al
sub eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x40]
jle 0x10016ad3
mov eax, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
mov eax, dword [ebp - 0x74]
mov eax, dword [ebp - 0x3c]
mov eax, esi
jmp 0x10016ae5
mov eax, ecx
xor edx, edx
cmp eax, 0xffffffff
mov eax, dword [ebp - 0x1c]
setge dl
xor ecx, ecx
cmp edx, eax
push 0
setg cl
xor eax, eax
cmp ecx, edi
pop ecx
setne al
mov dword [ebp - 0x14], eax
dec dword [ebp - 8]
jns 0x10016a91
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], ecx
jle 0x10016a82
dec dword [ebp - 0x10]
jns 0x10016a5b
jmp 0x10016b37
mov byte [ebp - 1], cl
cmp byte [ebp - 1], 0
je 0x10016b37
call ebx
push eax
call edi
push eax
call dword [sym.imp.GDI32.dll_UpdateColors]
xor ecx, ecx
mov eax, dword [ebp - 0x44]
mov dword [eax], ecx
jmp 0x10016815
push 3
pop esi
xor ebx, ebx
mov dword [ebp - 0x14], 0x48261f9c
push 2
mov dword [ebp - 0x14], 0xfffffffa
inc ebx
pop edi
cmp dword [ebp - 0x14], 0xffffffec
je 0x10016c2b
mov dword [ebp - 0xc], 0xe1c97412
mov dword [ebp - 0xc], edx
jmp 0x10016b7c
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x58], 0x446df37d
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], edi
jl 0x10016b6e
mov dword [ebp - 0xc], edx
jmp 0x10016b94
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x64], 0xd4f2887c
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], esi
jl 0x10016b86
mov dword [ebp - 0x60], edx
jmp 0x10016bad
mov dword [ebp - 0x20], 8
cmp dword [ebp - 0x20], edx
jne 0x10016bb2
inc dword [ebp - 0x60]
cmp dword [ebp - 0x60], ebx
jle 0x10016b9e
mov dword [ebp - 0xc], edi
cmp dword [ebp - 0xc], edx
jl 0x10016c23
mov dword [ebp - 8], edx
jmp 0x10016bc9
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x50], esi
inc dword [ebp - 8]
cmp dword [ebp - 8], esi
jl 0x10016bbf
mov dword [ebp - 0x50], edx
jmp 0x10016c13
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x10], edx
jmp 0x10016c0b
mov dword [ebp - 8], 0x5b1b6fd4
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + eax*4 - 0x58]
mov eax, dword [ebp - 0x50]
mov dword [ebp + eax*4 - 0x58], ecx
mov dword [ebp - 8], edx
jmp 0x10016c03
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x58], 0xdca27289
inc dword [ebp - 8]
cmp dword [ebp - 8], edi
jl 0x10016bf5
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], ebx
jle 0x10016bdb
inc dword [ebp - 0x50]
cmp dword [ebp - 0x50], ebx
jle 0x10016bd3
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x4c], eax
dec dword [ebp - 0xc]
jns 0x10016bba
dec dword [ebp - 0x14]
jmp 0x10016b58
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], edx
jmp 0x10016c44
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x94], 0x2eac4530
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], esi
jl 0x10016c33
mov dword [ebp - 0xc], edx
jmp 0x10016c5b
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x88], edx
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], esi
jl 0x10016c4e
cmp dword [ebp - 8], edx
je 0x10016c6f
mov eax, ebx
cmp dword [ebp - 0x8c], edx
jne 0x10016c71
mov eax, edx
mov dword [ebp - 0x84], eax
mov dword [ebp - 8], edx
jmp 0x10016c8e
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], 0xfffffff6
dec dword [ebp - 0x18]
jne 0x10016c93
inc dword [ebp - 8]
cmp dword [ebp - 8], edi
jle 0x10016c7c
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret