Function at 0x478df0
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 0x57e36d
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 0x4791e5
mov eax, dword [ecx + 0x24]
add ecx, 0x24
mov dword [ebp - 0x244], ecx
cmp dword [eax - 0xc], 0
jne 0x478e6a
push 3
push 0x5a230c
call fcn.00405730
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x478e7f
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478e94
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x478e96
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 0x478ebb
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x478ed0
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x478ed2
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.0051f290
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 0x478f28
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 0x478f5f
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.0053bb9e
add esp, 8
test eax, eax
js 0x4798a3
cmp eax, dword [esi - 8]
jg 0x4798a3
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [ebx - 8]
push ebx
call fcn.0053bb9e
add esp, 8
test eax, eax
js 0x4798a3
cmp eax, dword [ebx - 8]
jg 0x4798a3
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
test edi, edi
je 0x4791cf
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 0x479409
mov ecx, dword [0x5c4c84]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp ecx, 0xffffffff
jne 0x479072
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0051f290
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 0x5a2314
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, 0x5a2314
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 0x4790e6
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4790e2
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x4790e2
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4790e6
mov ecx, edx
call edi
cmp byte [ebp - 0x235], 0
je 0x479419
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 0x4793d1
mov ecx, dword [0x5c9f54]
lea eax, [ebp - 0x270]
push eax
call fcn.004820e0
mov byte [ebp - 4], 2
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x47914f
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x479164
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x479166
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 0x479216
lea ecx, [ebp - 0x228]
call fcn.00404e00
lea ecx, [ebp - 0x270]
call fcn.004778c0
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.0051b15a
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x270]
mov ecx, 0x59af0c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x479247
test dx, dx
je 0x479243
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x479247
add eax, 4
add ecx, 4
test dx, dx
jne 0x479221
xor eax, eax
jmp 0x47924c
sbb eax, eax
or eax, 1
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
setne al
test al, al
je 0x479273
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, 0x59af0c
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4792a6
test dx, dx
je 0x4792a2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4792a6
add eax, 4
add ecx, 4
test dx, dx
jne 0x479280
xor eax, eax
jmp 0x4792ab
sbb eax, eax
or eax, 1
test eax, eax
setne al
test al, al
je 0x4792cb
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 0x47930c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x47930a
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x47930a
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x47930c
call edx
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 1
call fcn.004778c0
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 0x47945a
mov ecx, dword [ebp - 0x248]
mov eax, dword [ecx]
cmp dword [eax - 0xc], 5
jle 0x479498
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 0x479483
test dx, dx
je 0x4793ca
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x479483
add eax, 4
add ecx, 4
test dx, dx
jne 0x4793a0
xor eax, eax
jmp 0x479488
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 0x479419
mov dword [ebp - 0x260], 0
jmp 0x479419
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 0x4791cf
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 0x479321
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 0x4791e5
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
je 0x479498
mov edi, 1
jmp 0x47949a
xor edi, edi
test byte [ebp - 0x254], 1
je 0x47950e
mov ecx, dword [ebp - 0x234]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x47950e
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 0x479506
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 0x4794fc
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x47950e
mov ecx, edx
call dword [ebp - 0x230]
jmp 0x47950e
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 0x479576
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 0x4791e5
mov edi, dword [ebp - 0x240]
lea eax, [ebp - 0x230]
push eax
lea ecx, [edi + 0x28]
call fcn.004782f0
mov byte [ebp - 4], 4
mov eax, dword [edi + 0x34]
sub eax, dword [edi + 0x30]
je 0x47959c
mov ecx, dword [edi + 0x30]
jmp 0x47959e
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 0x47985f
mov eax, dword [ebp - 0x240]
cmp dword [eax + 0x3c], 0
je 0x4796fe
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x4795e9
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4795fe
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x479600
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 0x479641
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.0053bb9e
add esp, 8
test eax, eax
js 0x4798a3
cmp eax, dword [esi - 8]
jg 0x4798a3
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [ebp - 0x22c], ecx
je 0x479854
push esi
call fcn.0053e155
add esp, 4
cmp eax, 0x12d
je 0x479750
cmp eax, 0x12e
je 0x479750
cmp eax, 0x12f
je 0x479750
mov byte [ebp - 4], 4
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4796f8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x47974c
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x47974c
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 0x4798af
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4798ad
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x4798ad
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4798af
call edx
jmp 0x4796f8
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 0x479799
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 0x479849
cmp dword [esi - 0xc], 0
je 0x479849
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.00478df0
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 0x4791f8
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 0x4791e5
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 0x4798f4
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4798f2
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x4798f2
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call ebx
jmp 0x4798fa
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 0x479937
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x479935
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x479935
push 0
push dword [ecx + 4]
call ebx
jmp 0x479937
call edx
push 4
call fcn.0051aa14
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.0047a410
push 4
call fcn.0051aa14
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.0047a410
push 4
call fcn.0051aa14
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.0047a410
sub esp, 8
mov ecx, esp
push esi
call fcn.0047a030
sub esp, 8
mov ecx, esp
push edi
call fcn.0047a030
sub esp, 8
mov ecx, esp
push ebx
call fcn.0047a030
mov ecx, dword [ebp - 0x250]
call fcn.00477610
mov eax, dword [ebp - 0x250]
add esp, 0x18
jmp 0x4791f8