Function at 0x4a54a0
Capabilities:
Check http status code
Connect to http server
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ca7b8
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x4fca20]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], ecx
mov ebx, 2
xor edi, edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], edi
call fcn.004a4740
mov esi, eax
mov dword [ebp - 0x38], esi
cmp esi, edi
je 0x4a5cb6
mov eax, dword [0x4fc7ec]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fc7ec
call edx
add eax, 0x10
mov dword [ebp - 0x20], eax
mov eax, dword [0x4fc7ec]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fc7ec
mov dword [ebp - 4], edi
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [0x4fc7ec]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fc7ec
mov byte [ebp - 4], 1
call edx
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [0x4fc7ec]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fc7ec
mov byte [ebp - 4], bl
call edx
add eax, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x20]
push edx
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x28], 3
mov dword [ebp - 0x2c], 0x50
call fcn.004abd40
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add esp, 0x1c
push edi
push edi
push ecx
mov ecx, dword [ebp - 0x2c]
push edx
mov edx, dword [ebp - 0x20]
push eax
push ecx
push edx
push esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
mov dword [ebp - 0x34], ebx
cmp ebx, edi
jne 0x4a5659
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a55cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a55ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5611
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5a53
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edx, dword [0x4fc7ec]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc7ec
call eax
add eax, 0x10
mov dword [ebp + 8], eax
mov esi, dword [ebp + 0xc]
mov byte [ebp - 4], 4
cmp esi, edi
je 0x4a56a0
test esi, 0xffff0000
jne 0x4a56a4
movzx edi, si
push 0
push edi
call fcn.0040114c
add esp, 8
test eax, eax
je 0x4a56c9
push edi
push eax
lea ecx, [ebp + 8]
call fcn.0040188a
jmp 0x4a56c9
xor eax, eax
jmp 0x4a56bf
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4a56b0
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp + 8]
call fcn.0040170b
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x30]
lea edx, [ebp + 8]
push edx
push eax
push ebx
mov byte [ebp - 4], 5
call fcn.004a5230
mov edi, eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5707
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x4a5c12
mov ecx, dword [ebp - 0x10]
push 0
push 0xa0400000
push 0
push 0x4cd850
push str.HTTP_1.1
push ecx
push 0x4d36cc
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4a57d5
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4a5760
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5783
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a57a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5a46
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4a5a46
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4a57de
mov esi, eax
mov edx, dword [0x4fc7ec]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc7ec
call eax
add eax, 0x10
mov dword [ebp + 8], eax
mov byte [ebp - 4], 6
test esi, esi
je 0x4a5822
test esi, 0xffff0000
jne 0x4a5826
movzx esi, si
push 0
push esi
call fcn.0040114c
add esp, 8
test eax, eax
je 0x4a5849
push esi
push eax
lea ecx, [ebp + 8]
call fcn.0040188a
jmp 0x4a5849
xor eax, eax
jmp 0x4a583f
mov eax, esi
lea edx, [eax + 2]
jmp 0x4a5830
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a5830
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp + 8]
call fcn.0040170b
push str..frd
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp + 0xc]
push edx
mov byte [ebp - 4], 7
call fcn.0040338d
add esp, 0xc
mov eax, dword [ebp + 0xc]
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocStringLen
mov bl, 8
push eax
mov byte [ebp - 4], bl
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4a588e
xor esi, esi
jmp 0x4a58a2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, edi
mov edi, dword [ebp - 0x30]
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x4a58b5
mov ecx, dword [edi + 0x60]
push ecx
push esi
push 0
call eax
mov edx, dword [ebp - 0x14]
push edx
mov ecx, edi
call fcn.004a3f90
mov eax, dword [0x4fc7ec]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fc7ec
call edx
add eax, 0x10
mov dword [ebp + 0x10], eax
push esi
lea eax, [ebp + 0x10]
push 0x4daa38
push eax
mov byte [ebp - 4], 9
call fcn.00401a85
mov esi, dword [ebp + 0x10]
mov eax, dword [esi - 0xc]
mov ecx, dword [ebp - 0x14]
add esp, 0xc
push 0x20000000
push eax
push esi
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4a5921
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebx, ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
push 0xea60
push 0x4a4070
lea ecx, [ebp - 0x48]
push ecx
lea edx, [ebp - 0x14]
push edx
push edi
lea ecx, [edi + 0x10]
mov byte [ebp - 4], 0xa
call fcn.004a4c70
test eax, eax
jne 0x4a5a71
mov eax, dword [ebp - 0x48]
cmp eax, ebx
je 0x4a5963
push eax
call fcn.0047d656
add esp, 4
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5986
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a59a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a59cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a59ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5a12
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5a38
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x14]
cmp esi, ebx
je 0x4a5a46
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x38]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov esi, dword [ebp - 0x14]
push ebx
lea ecx, [ebp + 0x10]
push ecx
lea edx, [ebp + 0x18]
push edx
push 0x20000013
push esi
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x10], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov eax, dword [ebp + 0x18]
cmp eax, 0xc8
je 0x4a5b9a
cmp eax, 0xce
je 0x4a5b9a
mov eax, dword [ebp - 0x48]
cmp eax, ebx
je 0x4a5abc
push eax
call fcn.0047d656
add esp, 4
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5adf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5b02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5b25
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5b48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5b6b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5a3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4a5a3b
push esi
mov ecx, edi
call fcn.004a3b50
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push eax
push ecx
push edx
lea eax, [ebp + 8]
push eax
push esi
mov ecx, edi
call fcn.004a4de0
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x24], ebx
cmp eax, ebx
je 0x4a5bca
push eax
call fcn.0047d656
add esp, 4
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5bed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5c1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4a5c1e
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x24], 1
xor ebx, ebx
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5c41
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5c64
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5c87
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4a5a3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4a5a3b
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14