Function at 0x46aa40
Capabilities:
Check if file exists
Connect to http server
Create http request
Parse url
Print debug messages
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56b2d3
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x5b3124]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x238], esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24c], eax
lea eax, [esi + 0x20]
mov dword [ebp - 0x244], eax
mov eax, dword [eax]
mov dword [ebp - 0x254], 0
cmp dword [eax - 0xc], 0
je 0x46ac40
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x24]
cmp dword [eax - 0xc], 0
jne 0x46aab6
push 3
push 0x59036c
call fcn.00405500
call fcn.00406bf0
mov ecx, eax
test ecx, ecx
jne 0x46aacb
push 0x80004005
call fcn.00406fb0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46aae0
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x46aae2
call edx
lea ebx, [eax + 0x10]
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 4], 0
call fcn.00406bf0
mov ecx, eax
test ecx, ecx
jne 0x46ab07
push 0x80004005
call fcn.00406fb0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46ab1c
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x46ab1e
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x228], edi
push 0x3c
lea eax, [ebp - 0x2a4]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.0050d580
mov dword [ebp - 0x2a4], 0x3c
mov ecx, 1
mov eax, dword [ebx - 8]
add esp, 0xc
sub ecx, dword [ebx - 4]
sub eax, 0x104
or eax, ecx
jge 0x46ab72
push 0x104
lea ecx, [ebp - 0x22c]
call fcn.00405730
mov ebx, dword [ebp - 0x22c]
mov dword [ebp - 0x294], ebx
mov ecx, 1
mov dword [ebp - 0x290], 0x104
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x400
or eax, ecx
jge 0x46abac
push 0x400
lea ecx, [ebp - 0x228]
call fcn.00405730
mov edi, dword [ebp - 0x228]
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x278], edi
push eax
push 0
push 0
push dword [esi + 0x20]
mov dword [ebp - 0x274], 0x400
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
push dword [ebx - 8]
mov dword [ebp - 0x240], eax
push ebx
call fcn.00529e8e
add esp, 8
test eax, eax
js 0x46b410
cmp eax, dword [ebx - 8]
jg 0x46b410
mov dword [ebx - 0xc], eax
xor ecx, ecx
mov word [ebx + eax*2], cx
push dword [edi - 8]
push edi
call fcn.00529e8e
add esp, 8
test eax, eax
js 0x46b410
cmp eax, dword [edi - 8]
jg 0x46b410
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
cmp dword [ebp - 0x240], ecx
jne 0x46ac71
lea ecx, [ebp - 0x228]
call fcn.00404bc0
lea ecx, [ebp - 0x22c]
call fcn.00404bc0
mov eax, dword [ebp - 0x24c]
mov dword [eax], 0
mov dword [eax + 4], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0050975e
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x1c]
xorps xmm0, xmm0
movq qword [ebp - 0x260], xmm0
mov dword [ebp - 0x258], ecx
cmp dword [eax - 0xc], ecx
jne 0x46ad09
mov ecx, dword [0x5b3c84]
cmp ecx, 0xffffffff
jne 0x46acf9
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0050d580
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x591ebc
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, eax
neg ecx
sbb ecx, ecx
neg ecx
mov dword [0x5b3c84], ecx
xor eax, eax
cmp ecx, 1
setne al
mov dword [ebp - 0x260], eax
jmp 0x46ad19
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x260], 3
push 0
push 0
push 0
push 0
push dword [esi + 0x18]
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x248], eax
test eax, eax
je 0x46ac2a
push 0xc
lea ecx, [ebp - 0x260]
push ecx
push 0x26
push eax
call dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
jne 0x46ad77
lea ecx, [ebp - 0x228]
call fcn.00404bc0
lea ecx, [ebp - 0x22c]
call fcn.00404bc0
push dword [ebp - 0x248]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x46ac40
push 8
lea eax, [ebp - 0x268]
mov dword [ebp - 0x268], 1
push eax
push 0x32
push 0
mov dword [ebp - 0x264], 0
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 1
push 0
push 3
push 0
push 0
push dword [ebp - 0x28c]
push ebx
push dword [ebp - 0x248]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x240], eax
test eax, eax
je 0x46ad4e
mov eax, dword [esi + 0x20]
lea ecx, [esi + 0x20]
cmp dword [eax - 0xc], 5
jle 0x46ae2e
push 5
lea eax, [ebp - 0x224]
push eax
call fcn.004047c0
mov dword [ebp - 0x254], 1
mov ecx, str.https
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x46ae16
test dx, dx
je 0x46ae12
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x46ae16
add eax, 4
add ecx, 4
test dx, dx
jne 0x46adf0
xor eax, eax
jmp 0x46ae1b
sbb eax, eax
or eax, 1
test eax, eax
mov dword [ebp - 0x220], 1
sete al
test al, al
jne 0x46ae38
mov dword [ebp - 0x220], 0
test byte [ebp - 0x254], 1
je 0x46aeac
mov ecx, dword [ebp - 0x224]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x46aeac
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
mov dword [ebp - 0x230], esi
mov esi, dword [ebp - 0x238]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46aea4
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
mov dword [ebp - 0x230], esi
mov esi, dword [ebp - 0x238]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x46ae9a
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x46aeac
mov ecx, edx
call dword [ebp - 0x230]
jmp 0x46aeac
mov ecx, edx
call dword [ebp - 0x230]
cmp dword [ebp - 0x220], 0
mov ecx, 0xc81000
push 1
mov eax, 0x680000
cmovne eax, ecx
push eax
push 0
push 0
push 0
push edi
push dword [esi + 0x24]
push dword [ebp - 0x240]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x230], eax
test eax, eax
jne 0x46af14
lea ecx, [ebp - 0x228]
call fcn.00404bc0
lea ecx, [ebp - 0x22c]
call fcn.00404bc0
push dword [ebp - 0x240]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x248]
call esi
jmp 0x46ac40
lea eax, [ebp - 0x234]
push eax
lea ecx, [esi + 0x28]
call fcn.00469f10
mov byte [ebp - 4], 2
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x30]
je 0x46af34
mov ecx, dword [esi + 0x30]
jmp 0x46af36
xor ecx, ecx
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x30]
mov esi, dword [ebp - 0x234]
push eax
push ecx
push dword [esi - 0xc]
push esi
push dword [ebp - 0x230]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x46b0e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x224], eax
cmp eax, 0x2f19
je 0x46b013
cmp eax, 0x2f0d
je 0x46b013
cmp eax, 0x2f88
jne 0x46aff7
mov ecx, dword [ebp - 0x238]
mov eax, dword [ecx + 0x34]
sub eax, dword [ecx + 0x30]
je 0x46af98
mov edx, dword [ecx + 0x30]
jmp 0x46af9a
xor edx, edx
mov eax, dword [ecx + 0x34]
sub eax, dword [ecx + 0x30]
push eax
mov eax, dword [sym.imp.WININET.dll_HttpSendRequestW]
push edx
push dword [esi - 0xc]
push esi
push dword [ebp - 0x230]
call eax
test eax, eax
jne 0x46b0e4
lea ecx, [ebp - 0x220]
call fcn.00404d40
mov byte [ebp - 4], 4
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
push str._Http__Redirect_HttpSendRequest_Failed__code:_d_n
lea eax, [ebp - 0x220]
push eax
call fcn.004155d0
add esp, 0xc
push dword [ebp - 0x220]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x46b1ec
lea ecx, [ebp - 0x220]
call fcn.00404d40
mov byte [ebp - 4], 5
push dword [ebp - 0x224]
push str._Http__HttpSendRequest_Failed._code:_d_n
jmp 0x46afd7
lea eax, [ebp - 0x250]
mov dword [ebp - 0x220], 0
push eax
lea eax, [ebp - 0x220]
mov dword [ebp - 0x250], 4
push eax
push 0x1f
push dword [ebp - 0x230]
call dword [sym.imp.WININET.dll_InternetQueryOptionW]
or dword [ebp - 0x220], 0x180
lea eax, [ebp - 0x220]
push 4
push eax
push 0x1f
push dword [ebp - 0x230]
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov ecx, dword [ebp - 0x238]
mov eax, dword [ecx + 0x34]
sub eax, dword [ecx + 0x30]
je 0x46b077
mov edx, dword [ecx + 0x30]
jmp 0x46b079
xor edx, edx
mov eax, dword [ecx + 0x34]
sub eax, dword [ecx + 0x30]
push eax
mov eax, dword [sym.imp.WININET.dll_HttpSendRequestW]
push edx
push dword [esi - 0xc]
push esi
push dword [ebp - 0x230]
call eax
test eax, eax
jne 0x46b0e4
lea ecx, [ebp - 0x224]
call fcn.00404d40
mov byte [ebp - 4], 3
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
lea eax, [ebp - 0x224]
push str._Http__Retry_HttpSendRequest_Failed__code:_d_n
push eax
call fcn.004155d0
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 0xc
push dword [ebp - 0x224]
call esi
mov ecx, dword [ebp - 0x244]
push dword [ecx]
call esi
lea ecx, [ebp - 0x224]
jmp 0x46b1f2
mov eax, dword [ebp - 0x238]
cmp dword [eax + 0x3c], 0
je 0x46b2a8
call fcn.00406bf0
mov ecx, eax
test ecx, ecx
jne 0x46b109
push 0x80004005
call fcn.00406fb0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46b11e
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x46b120
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
mov byte [ebp - 4], 6
mov ecx, 1
mov dword [ebp - 0x250], 0x100
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
jge 0x46b161
push 0x100
lea ecx, [ebp - 0x220]
call fcn.00405730
mov esi, dword [ebp - 0x220]
push 0
lea eax, [ebp - 0x250]
push eax
push esi
push 0x13
push dword [ebp - 0x230]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
push dword [esi - 8]
mov dword [ebp - 0x224], eax
push esi
call fcn.00529e8e
add esp, 8
test eax, eax
js 0x46b410
cmp eax, dword [esi - 8]
jg 0x46b410
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [ebp - 0x224], ecx
jne 0x46b23b
lea ecx, [ebp - 0x224]
call fcn.00404d40
push esi
lea eax, [ebp - 0x224]
mov byte [ebp - 4], 7
push str._Http__HttpQueryInfo_Failed___Code:_s_n
push eax
call fcn.004155d0
add esp, 0xc
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x224]
call fcn.00404bc0
lea ecx, [ebp - 0x220]
call fcn.00404bc0
lea ecx, [ebp - 0x234]
call fcn.00404bc0
lea ecx, [ebp - 0x228]
call fcn.00404bc0
lea ecx, [ebp - 0x22c]
call fcn.00404bc0
push dword [ebp - 0x230]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x240]
call esi
push dword [ebp - 0x248]
call esi
jmp 0x46ac40
push esi
call fcn.0052c445
add esp, 4
cmp eax, 0x12d
je 0x46b2fa
cmp eax, 0x12e
je 0x46b2fa
cmp eax, 0x12f
je 0x46b2fa
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x46b2a2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46b2f6
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x46b2f6
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x234]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x46b41c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46b41a
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x46b41a
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x46b41c
call edx
jmp 0x46b2a2
lea ecx, [ebp - 0x224]
call fcn.00404d40
mov byte [ebp - 4], 8
mov ecx, 1
mov esi, dword [ebp - 0x224]
mov dword [ebp - 0x23c], 0x400
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x46b343
push 0x400
lea ecx, [ebp - 0x224]
call fcn.00405730
mov esi, dword [ebp - 0x224]
mov ebx, dword [ebp - 0x230]
lea eax, [ebp - 0x23c]
push 0
push eax
push esi
push 0x21
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
push dword [esi - 8]
mov edi, eax
push esi
call fcn.00529e8e
add esp, 8
test eax, eax
js 0x46b410
cmp eax, dword [esi - 8]
jg 0x46b410
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test edi, edi
je 0x46b1e1
cmp dword [esi - 0xc], ecx
je 0x46b1e1
mov ecx, dword [ebp - 0x244]
lea eax, [ebp - 0x224]
push eax
call fcn.00404b60
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [ebp - 0x240]
call esi
push dword [ebp - 0x248]
call esi
mov esi, dword [ebp - 0x24c]
mov ecx, dword [ebp - 0x238]
push esi
call fcn.0046aa40
lea ecx, [ebp - 0x224]
call fcn.00404bc0
lea ecx, [ebp - 0x220]
call fcn.00404bc0
lea ecx, [ebp - 0x234]
call fcn.00404bc0
lea ecx, [ebp - 0x228]
call fcn.00404bc0
lea ecx, [ebp - 0x22c]
call fcn.00404bc0
mov eax, esi
jmp 0x46ac53
push 0x80070057
call fcn.00406fb0
call edx
or esi, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x46b461
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46b45f
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x46b45f
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call edi
jmp 0x46b467
call edx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], esi
dec esi
test esi, esi
jg 0x46b4a4
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46b4a2
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x46b4a2
push 0
push dword [ecx + 4]
call edi
jmp 0x46b4a4
call edx
push 4
call fcn.00509018
mov ecx, dword [ebp - 0x248]
add esp, 4
mov ebx, dword [ebp - 0x238]
mov dword [eax], ecx
mov ecx, ebx
push dword [ebp - 0x23c]
push eax
call fcn.0046bee0
push 4
call fcn.00509018
mov ecx, dword [ebp - 0x240]
lea edi, [ebx + 8]
add esp, 4
mov dword [eax], ecx
mov ecx, edi
push dword [ebp - 0x23c]
push eax
call fcn.0046bee0
push 4
call fcn.00509018
mov ecx, dword [ebp - 0x230]
lea esi, [ebx + 0x10]
add esp, 4
mov dword [eax], ecx
mov ecx, esi
push dword [ebp - 0x23c]
push eax
call fcn.0046bee0
sub esp, 8
mov ecx, esp
push esi
call fcn.0046bb40
sub esp, 8
mov ecx, esp
push edi
call fcn.0046bb40
sub esp, 8
mov ecx, esp
push ebx
call fcn.0046bb40
mov ecx, dword [ebp - 0x24c]
call fcn.004693c0
mov eax, dword [ebp - 0x24c]
add esp, 0x18
jmp 0x46ac53