Function at 0x4787c0
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 0x57dddd
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x5c4104]
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 0x478bb5
mov eax, dword [ecx + 0x24]
add ecx, 0x24
mov dword [ebp - 0x244], ecx
cmp dword [eax - 0xc], 0
jne 0x47883a
push 3
push 0x5a22ac
call fcn.00405730
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x47884f
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478864
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x478866
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 0x47888b
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4788a0
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4788a2
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.0051edd0
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 0x4788f8
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 0x47892f
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.0053b6de
add esp, 8
test eax, eax
js 0x479273
cmp eax, dword [esi - 8]
jg 0x479273
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [ebx - 8]
push ebx
call fcn.0053b6de
add esp, 8
test eax, eax
js 0x479273
cmp eax, dword [ebx - 8]
jg 0x479273
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
test edi, edi
je 0x478b9f
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 0x478dd9
mov ecx, dword [0x5c4c84]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp ecx, 0xffffffff
jne 0x478a42
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0051edd0
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 0x5a22b4
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 [0x5c4c84], ecx
xor eax, eax
mov edx, 0x5a22b4
cmp ecx, 1
push ecx
setne al
lea ecx, [ebp - 0x228]
mov dword [ebp - 0x260], eax
call fcn.00435920
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 0x478ab6
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478ab2
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x478ab2
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x478ab6
mov ecx, edx
call edi
cmp byte [ebp - 0x235], 0
je 0x478de9
mov edi, dword [0x5c9f54]
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 0x478da1
mov ecx, dword [0x5c9f54]
lea eax, [ebp - 0x270]
push eax
call fcn.00481ab0
mov byte [ebp - 4], 2
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x478b1f
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478b34
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x478b36
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.0041f560
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 0x478be6
lea ecx, [ebp - 0x228]
call fcn.00404e00
lea ecx, [ebp - 0x270]
call fcn.00477290
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.0051ac8e
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x270]
mov ecx, 0x59aeec
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x478c17
test dx, dx
je 0x478c13
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x478c17
add eax, 4
add ecx, 4
test dx, dx
jne 0x478bf1
xor eax, eax
jmp 0x478c1c
sbb eax, eax
or eax, 1
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
setne al
test al, al
je 0x478c43
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, 0x59aeec
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x478c76
test dx, dx
je 0x478c72
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x478c76
add eax, 4
add ecx, 4
test dx, dx
jne 0x478c50
xor eax, eax
jmp 0x478c7b
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x478c9b
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 0x478cdc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478cda
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x478cda
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x478cdc
call edx
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 1
call fcn.00477290
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 0x478e2a
mov ecx, dword [ebp - 0x248]
mov eax, dword [ecx]
cmp dword [eax - 0xc], 5
jle 0x478e68
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 0x478e53
test dx, dx
je 0x478d9a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x478e53
add eax, 4
add ecx, 4
test dx, dx
jne 0x478d70
xor eax, eax
jmp 0x478e58
mov edi, dword [0x5c9f54]
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 0x478de9
mov dword [ebp - 0x260], 0
jmp 0x478de9
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 0x478b9f
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 0x478cf1
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 0x478bb5
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
je 0x478e68
mov edi, 1
jmp 0x478e6a
xor edi, edi
test byte [ebp - 0x254], 1
je 0x478ede
mov ecx, dword [ebp - 0x234]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x478ede
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 0x478ed6
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 0x478ecc
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x478ede
mov ecx, edx
call dword [ebp - 0x230]
jmp 0x478ede
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 0x478f46
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 0x478bb5
mov edi, dword [ebp - 0x240]
lea eax, [ebp - 0x230]
push eax
lea ecx, [edi + 0x28]
call fcn.00477cc0
mov byte [ebp - 4], 4
mov eax, dword [edi + 0x34]
sub eax, dword [edi + 0x30]
je 0x478f6c
mov ecx, dword [edi + 0x30]
jmp 0x478f6e
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 0x47922f
mov eax, dword [ebp - 0x240]
cmp dword [eax + 0x3c], 0
je 0x4790ce
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x478fb9
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478fce
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x478fd0
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 0x479011
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.0053b6de
add esp, 8
test eax, eax
js 0x479273
cmp eax, dword [esi - 8]
jg 0x479273
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [ebp - 0x22c], ecx
je 0x479224
push esi
call fcn.0053dc95
add esp, 4
cmp eax, 0x12d
je 0x479120
cmp eax, 0x12e
je 0x479120
cmp eax, 0x12f
je 0x479120
mov byte [ebp - 4], 4
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4790c8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x47911c
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x47911c
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 0x47927f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x47927d
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x47927d
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x47927f
call edx
jmp 0x4790c8
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 0x479169
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.0042d9b0
test edi, edi
je 0x479219
cmp dword [esi - 0xc], 0
je 0x479219
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.004787c0
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 0x478bc8
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 0x478bb5
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 0x4792c4
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4792c2
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x4792c2
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call ebx
jmp 0x4792ca
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 0x479307
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x479305
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x479305
push 0
push dword [ecx + 4]
call ebx
jmp 0x479307
call edx
push 4
call fcn.0051a548
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.00479de0
push 4
call fcn.0051a548
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.00479de0
push 4
call fcn.0051a548
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.00479de0
sub esp, 8
mov ecx, esp
push esi
call fcn.00479a00
sub esp, 8
mov ecx, esp
push edi
call fcn.00479a00
sub esp, 8
mov ecx, esp
push ebx
call fcn.00479a00
mov ecx, dword [ebp - 0x250]
call fcn.00476fe0
mov eax, dword [ebp - 0x250]
add esp, 0x18
jmp 0x478bc8