Function at 0x30009947
Capabilities:
Check http status code
Check internet connectivity via wininet
Create http request
Read data from internet
Read file on windows
Receive data
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x367c
call fcn.30012b70
mov eax, dword [0x30015078]
or dword [ebp - 0x3658], 0xffffffff
push ebx
xor ebx, ebx
push esi
mov dword [ebp - 4], eax
mov dword [ebp - 0x364c], ebx
mov dword [ebp - 0x3674], ebx
mov dword [ebp - 0x3654], ebx
mov dword [ebp - 0x3648], ebx
mov dword [ebp - 0x3650], ebx
mov dword [ebp - 0x365c], ebx
call fcn.30007340
mov eax, dword [0x300151b8]
mov ecx, dword [eax]
lea edx, [ebp - 0x364c]
push edx
push 0x30001dc0
push eax
call dword [ecx + 0x20]
mov esi, eax
cmp esi, ebx
jl 0x3000a15c
push edi
lea edx, [ebp - 0x3644]
push edx
push dword [ebp + 0x28]
xor eax, eax
mov ecx, 0x97e
lea edi, [ebp - 0x3644]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ebx
push eax
mov dword [ebp - 0x3644], 0x25f8
mov dword [ebp - 0x3640], 0x4000000
call dword [ecx + 0x1c]
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
test eax, eax
je 0x30009a0a
mov esi, 0x80004004
jmp 0x3000a15b
mov eax, dword [ebp + 0x28]
push dword [ebp + 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp + 8]
mov edi, eax
push ebx
mov dword [ebp - 0x3668], edi
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x30009a4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009a46
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
cmp edi, 2
mov dword [ebp - 0x3674], 1
je 0x30009da1
cmp edi, 3
je 0x30009da1
cmp edi, 4
jne 0x30009d97
push ebx
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x104c]
push eax
lea eax, [ebp - 0x2094]
push eax
mov dword [ebp + 8], 0x824
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlW]
test eax, eax
jne 0x30009ab8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
mov edi, 0xffff
jle 0x30009ab0
and esi, edi
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
jmp 0x30009abd
mov edi, 0xffff
test byte [ebp + 0x1d], 2
je 0x30009adf
push ebx
lea eax, [ebp + 0x28]
push eax
mov dword [ebp + 0x28], ebx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
jne 0x30009adf
mov esi, 0x800708ca
jmp 0x3000a15b
push ebx
push ebx
push ebx
push ebx
push 0x30001ba4
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, ebx
mov dword [ebp - 0x3654], eax
jne 0x30009b14
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009b0e
and esi, edi
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
mov dword [ebp + 0x1c], ebx
cmp dword [ebp - 0x3648], ebx
mov dword [ebp - 0x3678], ebx
mov dword [ebp - 0x367c], 4
mov dword [ebp + 0x28], ebx
je 0x30009b3e
push dword [ebp - 0x3648]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
push 0x80480200
push ebx
push ebx
lea eax, [ebp - 0x104c]
push eax
push dword [ebp - 0x3654]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
cmp eax, ebx
mov dword [ebp - 0x3648], eax
jne 0x30009b7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009b79
and esi, edi
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
lea eax, [ebp + 0x28]
push eax
lea eax, [ebp - 0x367c]
push eax
lea eax, [ebp - 0x3678]
push eax
push 0x20000013
push dword [ebp - 0x3648]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x30009bc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009bbc
and esi, edi
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
mov eax, dword [ebp - 0x3678]
mov ecx, 0x194
cmp eax, ecx
ja 0x30009c49
je 0x30009c91
cmp eax, 0xc8
je 0x30009c44
cmp eax, 0x12c
jbe 0x30009c9b
cmp eax, 0x12f
ja 0x30009c79
lea eax, [ebp + 0x28]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x104c]
push eax
push 0x33
push dword [ebp - 0x3648]
mov dword [ebp + 8], 0x824
mov dword [ebp + 0x28], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x30009c3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009c35
and esi, edi
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
mov dword [ebp + 0x1c], 1
jmp 0x30009c6a
mov dword [ebp + 0x1c], ebx
jmp 0x30009c6a
cmp eax, 0x198
je 0x30009c65
cmp eax, 0x1f5
jbe 0x30009c9b
cmp eax, 0x1f7
jbe 0x30009c91
cmp eax, 0x1f8
jne 0x30009c9b
mov esi, 0x80070102
cmp esi, ebx
jne 0x30009ca5
cmp dword [ebp + 0x1c], ebx
jne 0x30009b17
jmp 0x30009cab
cmp eax, 0x191
je 0x30009c87
cmp eax, 0x193
jne 0x30009c9b
mov esi, 0x80070005
jmp 0x3000a15b
mov esi, 0x80070002
jmp 0x3000a15b
mov esi, 0x8000ffff
jmp 0x3000a15b
jl 0x3000a15b
lea eax, [ebp - 0x3664]
push eax
push dword [ebp - 0x3648]
call fcn.300127b1
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
je 0x30009cfc
mov eax, dword [ecx + 4]
cmp dword [ebp - 0x3660], eax
jb 0x30009d5e
jne 0x30009ce9
mov eax, dword [ebp - 0x3664]
cmp eax, dword [ecx]
jbe 0x30009d5e
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [ecx + 0x50]
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], ebx
lea eax, [ebp - 0x3670]
push eax
push dword [ebp - 0x3648]
call fcn.30012759
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
cmp dword [ebp + 0x14], ebx
jl 0x30009eb1
jg 0x30009d2c
cmp dword [ebp + 0x10], ebx
jbe 0x30009eb1
push ebx
push ebx
push ebx
push dword [ebp + 0x10]
push dword [ebp - 0x3648]
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
cmp eax, 0xffffffff
jne 0x30009eb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009eab
and esi, edi
jmp 0x30009ea3
xor edi, edi
cmp dword [ebp + 0x24], ebx
jbe 0x3000a159
mov eax, dword [ebp + 0x20]
push ebx
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 3
push dword [eax + edi*4]
push dword [ebp - 0x364c]
call fcn.3000e959
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x30009d69
jmp 0x3000a159
mov esi, 0x8007000f
jmp 0x3000a15b
cmp edi, 2
mov eax, 0x8000080
jne 0x30009db3
cmp dword [0x3001519c], ebx
je 0x30009dc0
cmp edi, 3
jne 0x30009dc5
cmp dword [0x300151a4], ebx
jne 0x30009dc5
mov eax, 0x28000080
push ebx
push eax
push 3
push ebx
push 1
push 0x80000000
lea eax, [ebp - 0x2094]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x3658], edi
jne 0x30009e0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009e05
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
lea eax, [ebp - 0x3664]
push eax
push edi
call fcn.3000f679
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
je 0x30009e5b
mov eax, dword [ecx + 4]
cmp dword [ebp - 0x3660], eax
jb 0x30009f68
jne 0x30009e48
mov eax, dword [ebp - 0x3664]
cmp eax, dword [ecx]
jbe 0x30009f68
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [ecx + 0x50]
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], ebx
lea eax, [ebp - 0x3670]
push eax
push edi
call fcn.3000f148
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
cmp dword [ebp + 0x14], ebx
jl 0x30009eb1
jg 0x30009e7e
cmp dword [ebp + 0x10], ebx
jbe 0x30009eb1
push ebx
push ebx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x30009eb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x30009eab
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
xor edi, edi
cmp dword [ebp + 0x24], ebx
jbe 0x30009eed
mov eax, dword [ebp + 0x20]
mov eax, dword [eax + edi*4]
mov ecx, dword [eax]
lea edx, [ebp - 0x3664]
push edx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp - 0x366c]
push dword [ebp - 0x3670]
push eax
call dword [ecx + 0x24]
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x30009eb8
cmp dword [ebp - 0x3670], ebx
jne 0x30009fa1
cmp dword [ebp - 0x366c], ebx
jne 0x30009fa1
cmp dword [ebp + 0x24], ebx
mov dword [ebp + 0x28], ebx
jbe 0x3000a159
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x28]
push ebx
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
lea edi, [eax + ecx*4]
push dword [edi]
push dword [ebp - 0x364c]
call fcn.3000e959
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
push ebx
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 2
push dword [edi]
push dword [ebp - 0x364c]
call fcn.3000e959
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
inc dword [ebp + 0x28]
mov eax, dword [ebp + 0x28]
cmp eax, dword [ebp + 0x24]
jb 0x30009f11
jmp 0x3000a159
xor edi, edi
cmp dword [ebp + 0x24], ebx
jbe 0x3000a159
mov eax, dword [ebp + 0x20]
push ebx
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 3
push dword [eax + edi*4]
push dword [ebp - 0x364c]
call fcn.3000e959
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x30009f73
jmp 0x3000a159
mov eax, dword [ebp - 0x3668]
dec eax
dec eax
je 0x30009fd1
dec eax
je 0x30009fc0
dec eax
je 0x30009fb8
mov edi, 0x10000
jmp 0x30009fe5
mov ecx, dword [0x300151b0]
jmp 0x30009fc6
mov ecx, dword [0x300151a8]
mov eax, dword [0x30015194]
lea edi, [ecx + eax - 1]
jmp 0x30009fe0
mov eax, dword [0x30015194]
mov ecx, dword [0x300151a0]
lea edi, [eax + ecx - 1]
dec eax
not eax
and edi, eax
push 4
push 0x3000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp eax, ebx
mov dword [ebp - 0x3650], eax
jne 0x3000a123
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x3000a01c
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
jmp 0x3000a123
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
test eax, eax
jne 0x3000a12d
cmp dword [ebp - 0x3668], 2
je 0x3000a066
cmp dword [ebp - 0x3668], 3
je 0x3000a066
lea eax, [ebp - 0x365c]
push eax
push edi
push dword [ebp - 0x3650]
push dword [ebp - 0x3648]
call dword [sym.imp.WININET.dll_InternetReadFile]
jmp 0x3000a081
push ebx
lea eax, [ebp - 0x365c]
push eax
push edi
push dword [ebp - 0x3650]
push dword [ebp - 0x3658]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x3000a0a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, ebx
jle 0x3000a09f
and esi, 0xffff
or esi, 0x80070000
cmp esi, ebx
jl 0x3000a15b
cmp dword [ebp - 0x365c], ebx
mov dword [ebp + 0x28], ebx
je 0x3000a0ee
cmp dword [ebp + 0x24], ebx
jbe 0x3000a123
push dword [ebp - 0x365c]
mov eax, dword [ebp + 0x20]
push dword [ebp - 0x3650]
mov ecx, dword [ebp + 0x28]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push dword [eax + ecx*4]
push dword [ebp - 0x364c]
call fcn.3000e959
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
inc dword [ebp + 0x28]
mov eax, dword [ebp + 0x28]
cmp eax, dword [ebp + 0x24]
jb 0x3000a0b5
jmp 0x3000a123
cmp dword [ebp + 0x24], ebx
jbe 0x3000a120
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x28]
push ebx
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 2
push dword [eax + ecx*4]
push dword [ebp - 0x364c]
call fcn.3000e959
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
inc dword [ebp + 0x28]
mov eax, dword [ebp + 0x28]
cmp eax, dword [ebp + 0x24]
jb 0x3000a0f3
xor esi, esi
inc esi
cmp esi, ebx
je 0x3000a027
jmp 0x3000a159
xor edi, edi
cmp dword [ebp + 0x24], ebx
jbe 0x3000a159
mov eax, dword [ebp + 0x20]
push ebx
push ebx
push 0xffffffffffffffff
push 0xffffffffffffffff
push 4
push dword [eax + edi*4]
push dword [ebp - 0x364c]
call fcn.3000e959
mov esi, eax
cmp esi, ebx
jl 0x3000a15b
inc edi
cmp edi, dword [ebp + 0x24]
jb 0x3000a134
xor esi, esi
pop edi
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x64]
cmp dword [ebp - 0x3650], ebx
je 0x3000a17f
push 0x8000
push ebx
push dword [ebp - 0x3650]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
cmp dword [ebp - 0x3648], ebx
je 0x3000a193
push dword [ebp - 0x3648]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x3654], ebx
je 0x3000a1a7
push dword [ebp - 0x3654]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x3658], 0xffffffff
je 0x3000a1bc
push dword [ebp - 0x3658]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3674], ebx
je 0x3000a208
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x3000a208
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x3000a1e2
call esi
mov esi, eax
jmp 0x3000a1f2
call esi
mov esi, eax
and esi, 0xffff
or esi, 0x80070000
push ebx
push ebx
push ebx
push ebx
push 0xc0000015
push esi
call fcn.30011c9a
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, dword [ebp - 0x364c]
cmp eax, ebx
je 0x3000a218
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
pop ebx
call fcn.30012b55
leave
ret 0x24