Function at 0x477880
Capabilities:
Check if file exists
Connect to http server
Create http request
Parse url
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58308d
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x5ca104]
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 dword [ebp - 0x240], ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x250], eax
lea eax, [ecx + 0x20]
mov dword [ebp - 0x248], eax
mov eax, dword [eax]
mov dword [ebp - 0x254], 0
cmp dword [eax - 0xc], 0
je 0x477c75
mov eax, dword [ecx + 0x24]
add ecx, 0x24
mov dword [ebp - 0x244], ecx
cmp dword [eax - 0xc], 0
jne 0x4778fa
push 3
push 0x5a6c04
call fcn.00405730
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x47790f
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x477924
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x477926
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x220], esi
mov dword [ebp - 4], 0
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x47794b
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x477960
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x477962
call edx
lea ebx, [eax + 0x10]
mov dword [ebp - 0x224], ebx
push 0x3c
lea eax, [ebp - 0x2b8]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.00524040
mov dword [ebp - 0x2b8], 0x3c
mov edi, 1
mov eax, dword [esi - 8]
mov ecx, edi
sub ecx, dword [esi - 4]
sub eax, 0x104
add esp, 0xc
or eax, ecx
jge 0x4779b8
push 0x104
lea ecx, [ebp - 0x220]
call fcn.00405960
mov esi, dword [ebp - 0x220]
mov dword [ebp - 0x2a8], esi
mov ecx, edi
mov dword [ebp - 0x2a4], 0x104
mov eax, dword [ebx - 8]
sub ecx, dword [ebx - 4]
sub eax, 0x400
or eax, ecx
jge 0x4779ef
push 0x400
lea ecx, [ebp - 0x224]
call fcn.00405960
mov ebx, dword [ebp - 0x224]
mov ecx, dword [ebp - 0x248]
lea eax, [ebp - 0x2b8]
push eax
push 0
push 0
push dword [ecx]
mov dword [ebp - 0x28c], ebx
mov dword [ebp - 0x288], 0x400
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
push dword [esi - 8]
mov edi, eax
push esi
call fcn.0054094f
add esp, 8
test eax, eax
js 0x478333
cmp eax, dword [esi - 8]
jg 0x478333
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [ebx - 8]
push ebx
call fcn.0054094f
add esp, 8
test eax, eax
js 0x478333
cmp eax, dword [ebx - 8]
jg 0x478333
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
test edi, edi
je 0x477c5f
mov eax, dword [ebp - 0x240]
xorps xmm0, xmm0
movq qword [ebp - 0x260], xmm0
mov dword [ebp - 0x258], ecx
mov eax, dword [eax + 0x1c]
cmp dword [eax - 0xc], ecx
jne 0x477e99
mov ecx, dword [0x5cac84]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp ecx, 0xffffffff
jne 0x477b02
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.00524040
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 0x5a8060
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x21c]
push eax
call edi
mov ecx, eax
neg ecx
sbb ecx, ecx
neg ecx
mov dword [0x5cac84], ecx
xor eax, eax
mov edx, 0x5a8060
cmp ecx, 1
push ecx
setne al
lea ecx, [ebp - 0x228]
mov dword [ebp - 0x260], eax
call fcn.00436af0
add esp, 4
push dword [eax]
call edi
mov ecx, dword [ebp - 0x228]
test eax, eax
sete byte [ebp - 0x235]
add ecx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x477b76
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x477b72
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x477b72
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x477b76
mov ecx, edx
call edi
cmp byte [ebp - 0x235], 0
je 0x477ea9
mov edi, dword [0x5cff54]
mov dword [ebp - 0x234], edi
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x234]
mov edi, dword [edi]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp edi, 2
jne 0x477e61
mov ecx, dword [0x5cff54]
lea eax, [ebp - 0x270]
push eax
call fcn.00483dd0
mov byte [ebp - 4], 2
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x477bdf
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x477bf4
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x477bf6
call edx
add eax, 0x10
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x228]
push dword [ebp - 0x264]
push dword [ebp - 0x268]
push str.httphttp:___s:_s
push eax
call fcn.00420660
mov eax, dword [ebp - 0x240]
add esp, 0x10
mov esi, dword [ebp - 0x228]
push 0
push 0
push esi
push 3
push dword [eax + 0x18]
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x23c], eax
test eax, eax
jne 0x477ca6
lea ecx, [ebp - 0x228]
call fcn.00404e00
lea ecx, [ebp - 0x270]
call fcn.00476350
lea ecx, [ebp - 0x224]
call fcn.00404e00
lea ecx, [ebp - 0x220]
call fcn.00404e00
mov eax, dword [ebp - 0x250]
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.0051fefc
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x270]
mov ecx, 0x5a0e3c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x477cd7
test dx, dx
je 0x477cd3
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x477cd7
add eax, 4
add ecx, 4
test dx, dx
jne 0x477cb1
xor eax, eax
jmp 0x477cdc
sbb eax, eax
or eax, 1
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
setne al
test al, al
je 0x477d03
mov ecx, dword [ebp - 0x270]
mov eax, dword [ecx - 0xc]
add eax, eax
push eax
push ecx
mov ecx, dword [ebp - 0x23c]
push 0x1c
push ecx
call edi
mov eax, dword [ebp - 0x26c]
mov ecx, 0x5a0e3c
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x477d36
test dx, dx
je 0x477d32
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x477d36
add eax, 4
add ecx, 4
test dx, dx
jne 0x477d10
xor eax, eax
jmp 0x477d3b
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x477d5b
mov ecx, dword [ebp - 0x26c]
mov eax, dword [ecx - 0xc]
add eax, eax
push eax
push ecx
push 0x1d
push dword [ebp - 0x23c]
call edi
mov byte [ebp - 4], 2
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x477d9c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x477d9a
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x477d9a
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x477d9c
call edx
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 1
call fcn.00476350
mov esi, dword [ebp - 0x220]
push 8
lea eax, [ebp - 0x27c]
mov dword [ebp - 0x27c], 1
push eax
push 0x32
push 0
mov dword [ebp - 0x278], 0
call edi
push 1
push 0
push 3
push 0
push 0
push dword [ebp - 0x2a0]
push esi
push dword [ebp - 0x23c]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x228], eax
test eax, eax
je 0x477eea
mov ecx, dword [ebp - 0x248]
mov eax, dword [ecx]
cmp dword [eax - 0xc], 5
jle 0x477f28
push 5
lea eax, [ebp - 0x234]
push eax
call fcn.00404a00
mov dword [ebp - 0x254], 1
mov ecx, str.https
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x477f13
test dx, dx
je 0x477e5a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x477f13
add eax, 4
add ecx, 4
test dx, dx
jne 0x477e30
xor eax, eax
jmp 0x477f18
mov edi, dword [0x5cff54]
mov dword [ebp - 0x228], edi
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x228]
mov edi, dword [edi]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x477ea9
mov dword [ebp - 0x260], 0
jmp 0x477ea9
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x260], 3
mov eax, dword [ebp - 0x240]
push 0
push 0
push 0
push 0
push dword [eax + 0x18]
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x23c], eax
test eax, eax
je 0x477c5f
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
lea ecx, [ebp - 0x260]
push 0xc
push ecx
push 0x26
push eax
call edi
test eax, eax
jne 0x477db1
lea ecx, [ebp - 0x224]
call fcn.00404e00
lea ecx, [ebp - 0x220]
call fcn.00404e00
push dword [ebp - 0x23c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x477c75
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
je 0x477f28
mov edi, 1
jmp 0x477f2a
xor edi, edi
test byte [ebp - 0x254], 1
je 0x477f9e
mov ecx, dword [ebp - 0x234]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x477f9e
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
mov dword [ebp - 0x230], esi
mov esi, dword [ebp - 0x220]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x477f96
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
mov dword [ebp - 0x230], esi
mov esi, dword [ebp - 0x220]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x477f8c
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x477f9e
mov ecx, edx
call dword [ebp - 0x230]
jmp 0x477f9e
mov ecx, edx
call dword [ebp - 0x230]
push 1
mov ecx, 0xc81000
test edi, edi
mov eax, 0x680000
cmovne eax, ecx
push eax
mov eax, dword [ebp - 0x244]
push 0
push 0
push 0
push ebx
push dword [eax]
push dword [ebp - 0x228]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x234], eax
test eax, eax
jne 0x478006
lea ecx, [ebp - 0x224]
call fcn.00404e00
lea ecx, [ebp - 0x220]
call fcn.00404e00
push dword [ebp - 0x228]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x23c]
call esi
jmp 0x477c75
mov edi, dword [ebp - 0x240]
lea eax, [ebp - 0x230]
push eax
lea ecx, [edi + 0x28]
call fcn.00476d80
mov byte [ebp - 4], 4
mov eax, dword [edi + 0x34]
sub eax, dword [edi + 0x30]
je 0x47802c
mov ecx, dword [edi + 0x30]
jmp 0x47802e
xor ecx, ecx
mov eax, dword [edi + 0x34]
sub eax, dword [edi + 0x30]
mov edi, dword [ebp - 0x230]
push eax
push ecx
push dword [edi - 0xc]
push edi
push dword [ebp - 0x234]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x4782ef
mov eax, dword [ebp - 0x240]
cmp dword [eax + 0x3c], 0
je 0x47818e
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x478079
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x47808e
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x478090
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x244], esi
mov byte [ebp - 4], 5
mov ecx, 1
mov dword [ebp - 0x274], 0x100
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x100
or eax, ecx
jge 0x4780d1
push 0x100
lea ecx, [ebp - 0x244]
call fcn.00405960
mov esi, dword [ebp - 0x244]
push 0
lea eax, [ebp - 0x274]
push eax
push esi
push 0x13
push dword [ebp - 0x234]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
push dword [esi - 8]
mov dword [ebp - 0x22c], eax
push esi
call fcn.0054094f
add esp, 8
test eax, eax
js 0x478333
cmp eax, dword [esi - 8]
jg 0x478333
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [ebp - 0x22c], ecx
je 0x4782e4
push esi
call fcn.00542f06
add esp, 4
cmp eax, 0x12d
je 0x4781e0
cmp eax, 0x12e
je 0x4781e0
cmp eax, 0x12f
je 0x4781e0
mov byte [ebp - 4], 4
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x478188
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4781dc
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x4781dc
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x220]
mov byte [ebp - 4], 1
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x47833f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x47833d
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x47833d
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x47833f
call edx
jmp 0x478188
lea ecx, [ebp - 0x22c]
call fcn.00404f80
mov byte [ebp - 4], 6
mov ecx, 1
mov esi, dword [ebp - 0x22c]
mov dword [ebp - 0x24c], 0x400
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x400
or eax, ecx
jge 0x478229
push 0x400
lea ecx, [ebp - 0x22c]
call fcn.00405960
mov esi, dword [ebp - 0x22c]
mov ebx, dword [ebp - 0x234]
lea eax, [ebp - 0x24c]
push 0
push eax
push esi
push 0x21
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ecx
lea ecx, [ebp - 0x22c]
mov edi, eax
call fcn.0042ec30
test edi, edi
je 0x4782d9
cmp dword [esi - 0xc], 0
je 0x4782d9
mov ecx, dword [ebp - 0x248]
lea eax, [ebp - 0x22c]
push eax
call fcn.00404da0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
push dword [ebp - 0x228]
call esi
push dword [ebp - 0x23c]
call esi
mov esi, dword [ebp - 0x250]
mov ecx, dword [ebp - 0x240]
push esi
call fcn.00477880
lea ecx, [ebp - 0x22c]
call fcn.00404e00
lea ecx, [ebp - 0x244]
call fcn.00404e00
lea ecx, [ebp - 0x230]
call fcn.00404e00
lea ecx, [ebp - 0x224]
call fcn.00404e00
lea ecx, [ebp - 0x220]
call fcn.00404e00
mov eax, esi
jmp 0x477c88
lea ecx, [ebp - 0x22c]
call fcn.00404e00
lea ecx, [ebp - 0x244]
call fcn.00404e00
lea ecx, [ebp - 0x230]
call fcn.00404e00
lea ecx, [ebp - 0x224]
call fcn.00404e00
lea ecx, [ebp - 0x220]
call fcn.00404e00
push dword [ebp - 0x234]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x228]
call esi
push dword [ebp - 0x23c]
call esi
jmp 0x477c75
push 0x80070057
call fcn.004071e0
call edx
or edi, 0xffffffff
mov byte [ebp - 4], 0
add ebx, 0xfffffff0
mov eax, edi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x478384
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478382
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x478382
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call ebx
jmp 0x47838a
call edx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x4783c7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4783c5
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x4783c5
push 0
push dword [ecx + 4]
call ebx
jmp 0x4783c7
call edx
push 4
call fcn.0051f7b6
mov ecx, dword [ebp - 0x23c]
add esp, 4
mov ebx, dword [ebp - 0x240]
mov dword [eax], ecx
mov ecx, ebx
push dword [ebp - 0x24c]
push eax
call fcn.00478df0
push 4
call fcn.0051f7b6
mov ecx, dword [ebp - 0x228]
lea edi, [ebx + 8]
add esp, 4
mov dword [eax], ecx
mov ecx, edi
push dword [ebp - 0x24c]
push eax
call fcn.00478df0
push 4
call fcn.0051f7b6
mov ecx, dword [ebp - 0x234]
lea esi, [ebx + 0x10]
add esp, 4
mov dword [eax], ecx
mov ecx, esi
push dword [ebp - 0x24c]
push eax
call fcn.00478df0
sub esp, 8
mov ecx, esp
push esi
call fcn.00478a60
sub esp, 8
mov ecx, esp
push edi
call fcn.00478a60
sub esp, 8
mov ecx, esp
push ebx
call fcn.00478a60
mov ecx, dword [ebp - 0x250]
call fcn.004760a0
mov eax, dword [ebp - 0x250]
add esp, 0x18
jmp 0x477c88