Function at 0x1004516
Capabilities:
Query remote server for available data
Read data from internet
Receive data

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [0x101a0bc]
mov ecx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ecx], ebx
push 0xffffffffffffffff
mov dword [ebp - 0x248], ecx
push esi
lea ecx, [ebp - 0x114]
mov dword [ebp - 0x23c], edi
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x22c], ebx
mov dword [eax], 9
call fcn.01003722
lea eax, [ebp - 0x214]
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x22c]
push eax
push esi
push edi
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x21c], 0x80
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x238], 0xa
mov dword [ebp - 0x230], ebx
call fcn.010037b4
mov esi, eax
cmp esi, ebx
jl 0x1004970
push ebx
push 0x4600300
push ebx
push ebx
push 0x100155c
push dword [ebp - 0x230]
push 0x1001428
push dword [ebp - 0x22c]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
cmp eax, ebx
mov dword [ebp - 0x228], eax
je 0x100476c
mov dword [ebp - 0x274], 0x28
mov dword [ebp - 0x270], ebx
mov dword [ebp - 0x26c], 0x1001558
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x260], ebx
mov dword [ebp - 0x25c], ebx
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x254], ebx
mov dword [ebp - 0x250], ebx
sub esp, 0x28
push 0xa
pop ecx
mov edi, esp
push dword [ebp - 0x228]
lea esi, [ebp - 0x274]
push dword [ebp - 0x22c]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x114]
call fcn.010035fa
push eax
call fcn.0100432b
mov esi, eax
cmp esi, ebx
jge 0x1004796
cmp esi, 0xc00d1388
je 0x1004680
cmp esi, 0xc00d2ee1
jne 0x1004934
mov eax, dword [ebp - 0x238]
dec dword [ebp - 0x238]
test eax, eax
jbe 0x1004934
push dword [ebp - 0x230]
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x114]
push eax
xor eax, eax
cmp esi, 0xc00d2ee1
sete al
push eax
push dword [ebp - 0x228]
push dword [ebp - 0x23c]
call fcn.01003f75
mov esi, eax
cmp esi, ebx
jl 0x1004934
push dword [ebp - 0x228]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x224], ebx
mov dword [ebp - 0x228], ebx
jl 0x100472c
cmp dword [ebp - 0x220], ebx
je 0x100472c
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x114]
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0x114], ebx
call fcn.01003788
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x234], 1
mov esi, dword [ebp - 0x114]
cmp esi, ebx
jl 0x1004934
push ebx
push 0x4600300
push ebx
push ebx
push 0x100155c
push dword [ebp - 0x230]
push 0x1001428
push dword [ebp - 0x22c]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
cmp eax, ebx
mov dword [ebp - 0x228], eax
jne 0x1004635
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1004781
call esi
mov esi, eax
jmp 0x1004934
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
jmp 0x1004934
push ebx
push ebx
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 0x228]
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
je 0x100476c
mov eax, dword [ebp - 0x244]
inc eax
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
cmp edi, ebx
pop ecx
mov dword [ebp - 0x23c], edi
jne 0x10047d3
mov esi, 0x8007000e
jmp 0x1004934
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 0x244]
push edi
push dword [ebp - 0x228]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x100481f
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1004803
call esi
mov esi, eax
jmp 0x1004813
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
push edi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1004934
mov eax, dword [ebp - 0x24c]
push 0x100154c
push edi
mov byte [eax + edi], bl
mov esi, 0x80004005
call fcn.0100a423
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x10048bb
add edi, 0xa
push 0x1001544
push edi
call fcn.0100a423
cmp eax, ebx
pop ecx
pop ecx
je 0x10048bb
push 0x100152c
push edi
mov byte [eax], bl
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x1004876
mov eax, dword [ebp - 0x240]
mov dword [eax], 4
jmp 0x10048b9
push 0x1001518
push edi
call fcn.0100a423
cmp eax, ebx
pop ecx
pop ecx
je 0x10048bb
lea ecx, [ebp - 0x240]
push ecx
lea ecx, [ebp - 0x238]
push ecx
lea ecx, [ebp - 0x278]
push ecx
push dword [ebp - 0x240]
add eax, 0x12
push 0x100150c
push eax
call dword [sym.imp.msvcrt.dll_sscanf]
add esp, 0x18
cmp eax, 4
jne 0x10048bb
xor esi, esi
push dword [ebp - 0x23c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
cmp dword [ebp - 0x234], ebx
pop ecx
je 0x1004934
cmp dword [ebp - 0x114], ebx
jge 0x10048db
xor eax, eax
jmp 0x10048e1
mov eax, dword [ebp - 0x110]
lea eax, [eax + eax + 2]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
cmp edi, ebx
mov eax, dword [ebp - 0x248]
pop ecx
mov dword [eax], edi
je 0x10047c9
cmp dword [ebp - 0x114], ebx
jge 0x100490e
mov dword [ebp - 0x234], ebx
jmp 0x100491a
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x234], eax
lea ecx, [ebp - 0x114]
call fcn.010035fa
push eax
mov eax, dword [ebp - 0x234]
inc eax
push eax
push edi
call fcn.01002ff4
cmp dword [ebp - 0x22c], ebx
je 0x1004948
push dword [ebp - 0x22c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x228], ebx
je 0x100495c
push dword [ebp - 0x228]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x230], ebx
je 0x1004970
push dword [ebp - 0x230]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
lea ecx, [ebp - 0x224]
call fcn.01002c92
lea ecx, [ebp - 0x114]
call fcn.01002c92
mov ecx, dword [ebp - 4]
mov eax, esi
call fcn.01007613
pop edi
pop esi
pop ebx
leave
ret 0x10