Function at 0x40cf10
Capabilities:
Create http request
Get geographical location
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4ca850
push eax
mov eax, 0x2890
mov dword fs:[0], esp
call fcn.0042f7c0
push ebx
push esi
push edi
push 0x27ff
lea eax, [ebp - 0x2897]
mov byte [ebp - 0x2898], 0
push 0
push eax
call fcn.0042b420
add esp, 0xc
push 0
push 0
push 0
push 0
push 0x4fff7c
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [ebp - 0x58], 7
push 0x1b
xor eax, eax
mov dword [ebp - 0x5c], 0
push str.https:__api.2ip.ua_geo.json
lea ecx, [ebp - 0x6c]
mov word [ebp - 0x6c], ax
call fcn.00415c10
push 0
push 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x6c]
cmp dword [ebp - 0x58], 8
push 0
cmovae eax, dword [ebp - 0x6c]
push 0
push eax
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
test esi, esi
jne 0x40cfb9
xor bl, bl
jmp 0x40d213
lea eax, [ebp - 0x98]
push eax
push 0x2800
lea eax, [ebp - 0x2898]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
push 0x10
push str._country_code_:_
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x28], 0xf
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x3c], 0
call fcn.004156d0
mov byte [ebp - 4], 1
cmp byte [ebp - 0x2898], 0
mov dword [ebp - 0x10], 0xf
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x24], 0
jne 0x40d023
xor ecx, ecx
jmp 0x40d039
lea ecx, [ebp - 0x2898]
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d030
sub ecx, edx
push ecx
lea eax, [ebp - 0x2898]
push eax
lea ecx, [ebp - 0x24]
call fcn.004156d0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x3c]
push dword [ebp - 0x2c]
cmp dword [ebp - 0x28], 0x10
lea ecx, [ebp - 0x24]
push 0
cmovae eax, dword [ebp - 0x3c]
push eax
call fcn.00414300
cmp eax, 0xffffffff
je 0x40d1cb
add eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x24]
push 0xa
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.00413010
mov esi, eax
lea eax, [ebp - 0x24]
cmp eax, esi
je 0x40d0b9
cmp dword [ebp - 0x10], 0x10
jb 0x40d09e
push dword [ebp - 0x24]
call fcn.00422587
add esp, 4
push esi
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x10], 0xf
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x24], 0
call fcn.00413d40
cmp dword [ebp - 0x70], 0x10
jb 0x40d0cd
push dword [ebp - 0x84]
call fcn.00422587
add esp, 4
push 1
push 0
push 0x500000
lea ecx, [ebp - 0x24]
call fcn.00414300
cmp eax, 0xffffffff
je 0x40d1cb
push eax
push 0
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0x24]
call fcn.00413010
mov ebx, dword [ebp - 0x44]
xor edi, edi
mov dword [ebp - 0x94], 0x500004
mov dword [ebp - 0x90], 0x500008
mov dword [ebp - 0x8c], 0x50000c
mov dword [ebp - 0x88], 0x500010
mov dword [ebp - 0x84], 0x500014
mov dword [ebp - 0x80], 0x500018
mov dword [ebp - 0x7c], 0x50001c
mov dword [ebp - 0x78], 0x500020
mov dword [ebp - 0x74], 0x500024
mov dword [ebp - 0x70], 0x500028
mov edx, dword [ebp + edi*4 - 0x94]
cmp byte [edx], 0
jne 0x40d160
xor esi, esi
jmp 0x40d16e
mov esi, edx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x40d165
sub esi, ecx
cmp dword [ebp - 0x40], 0x10
lea ecx, [ebp - 0x54]
mov eax, esi
cmovae ecx, dword [ebp - 0x54]
cmp ebx, esi
cmovb eax, ebx
push eax
call fcn.0040b650
add esp, 4
test eax, eax
jne 0x40d19a
cmp ebx, esi
jb 0x40d19a
cmp ebx, esi
setne al
test eax, eax
je 0x40d1c7
inc edi
cmp edi, 9
jl 0x40d150
xor bl, bl
cmp dword [ebp - 0x40], 0x10
jb 0x40d1b3
push dword [ebp - 0x54]
call fcn.00422587
add esp, 4
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
jmp 0x40d1cd
mov bl, 1
jmp 0x40d1a2
xor bl, bl
cmp dword [ebp - 0x10], 0x10
jb 0x40d1de
push dword [ebp - 0x24]
call fcn.00422587
add esp, 4
cmp dword [ebp - 0x28], 0x10
mov dword [ebp - 0x10], 0xf
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x24], 0
jb 0x40d201
push dword [ebp - 0x3c]
call fcn.00422587
add esp, 4
mov dword [ebp - 0x28], 0xf
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x3c], 0
cmp dword [ebp - 0x58], 8
jb 0x40d224
push dword [ebp - 0x6c]
call fcn.00422587
add esp, 4
mov ecx, dword [ebp - 0xc]
mov al, bl
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret