Function at 0x40c4e0
Capabilities:
Check http status code
Create http request
Get http content length
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x598cdc
mov eax, dword fs:[0]
push eax
mov eax, 0x107c
call fcn.0045ef30
mov eax, dword [0x6102d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
push 0
push 0
push 0
push 0
mov dword [ebp - 0x106c], eax
mov eax, dword [ebp + 0x10]
push 0
mov dword [ebp - 0x1060], eax
mov dword [ebp - method.RC::RCInternetHandle.virtual_0], 0x603578
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
mov dword [ebp - 0x1084], ebx
push 4
lea eax, [ebp - 0x1064]
mov dword [ebp - 4], 0
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push eax
push 2
push ebx
mov dword [ebp - 0x1064], 0xbb8
call esi
push 4
lea eax, [ebp - 0x1064]
mov dword [ebp - 0x1064], 5
push eax
push 3
push ebx
call esi
mov dword [ebp - 0x1074], 0
mov dword [ebp - method.RC::RCHttpFile.virtual_0], vtable.RC::RCHttpFile.0
mov dword [ebp - 0x1070], 0
mov esi, dword [ebp - 0x1060]
mov byte [ebp - 4], 1
cmp dword [esi + 0x14], 8
jb 0x40c5b7
mov eax, dword [esi]
jmp 0x40c5b9
mov eax, esi
xor ecx, ecx
mov dword [ebp - 0x1014], 7
mov word [ebp - 0x1028], cx
lea ecx, [ebp - 0x1028]
push eax
mov dword [ebp - 0x1018], 0
call fcn.0040a730
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1078]
mov eax, dword [ebp - 0x1078]
call dword [eax + 4]
xor eax, eax
mov dword [ebp - 0x103c], 7
mov dword [ebp - 0x1040], 0
mov word [ebp - 0x1050], ax
push str.Accept:_
lea ecx, [ebp - 0x1050]
mov byte [ebp - 4], 3
call fcn.0040ce10
mov edx, dword [ebp - 0x1040]
test edx, edx
jne 0x40c634
xor ecx, ecx
jmp 0x40c648
cmp dword [ebp - 0x103c], 8
lea ecx, [ebp - 0x1050]
cmovae ecx, dword [ebp - 0x1050]
cmp dword [ebp - 0x1014], 8
lea eax, [ebp - 0x1028]
push ecx
cmovae eax, dword [ebp - 0x1028]
push edx
push ecx
push eax
push ebx
lea ecx, [ebp - 0x1078]
call fcn.0040d880
mov byte [ebp - 0x1051], al
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x103c]
cmp eax, 8
jb 0x40c6cf
mov edx, dword [ebp - 0x1050]
inc eax
mov ecx, edx
cmp eax, 0x7fffffff
ja 0x40cc04
add eax, eax
cmp eax, 0x1000
jb 0x40c6c6
test cl, 0x1f
jne 0x40cc09
mov edx, dword [edx - 4]
cmp edx, ecx
jae 0x40cc0e
sub ecx, edx
cmp ecx, 4
jb 0x40cc13
cmp ecx, 0x23
ja 0x40cc18
push edx
call fcn.0045fc75
add esp, 4
cmp byte [ebp - 0x1051], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1014]
sete byte [ebp - 0x1051]
cmp eax, 8
jb 0x40c73a
mov edx, dword [ebp - 0x1028]
inc eax
mov ecx, edx
cmp eax, 0x7fffffff
ja 0x40cc1d
add eax, eax
cmp eax, 0x1000
jb 0x40c731
test cl, 0x1f
jne 0x40cc22
mov edx, dword [edx - 4]
cmp edx, ecx
jae 0x40cc27
sub ecx, edx
cmp ecx, 4
jb 0x40cc2c
cmp ecx, 0x23
ja 0x40cc31
push edx
call fcn.0045fc75
add esp, 4
cmp byte [ebp - 0x1051], 0
mov eax, dword [ebp - 0x1074]
je 0x40c7b0
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - method.RC::RCHttpFile.virtual_0], vtable.RC::RCHttpFile.0
test eax, eax
je 0x40c768
push eax
call esi
xor eax, eax
mov dword [ebp - 0x1074], eax
mov ecx, dword [ebp - 0x1070]
test ecx, ecx
je 0x40c785
push ecx
call esi
mov eax, dword [ebp - 0x1074]
mov dword [ebp - 0x1070], 0
mov dword [ebp - method.RC::RCInternetHandle.virtual_0], vtable.RC::RCInternetHandle.0
test eax, eax
je 0x40c7a0
push eax
call esi
mov dword [ebp - 0x1074], 0
test ebx, ebx
je 0x40cbe4
push ebx
call esi
jmp 0x40cbe4
mov dword [ebp - 0x105c], 0
mov dword [ebp - 0x1064], 4
test eax, eax
je 0x40cb9d
push 0
lea ecx, [ebp - 0x1064]
push ecx
lea ecx, [ebp - 0x105c]
push ecx
push 0x20000013
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x40cb9d
cmp dword [ebp - 0x105c], 0xc8
setne al
test al, al
jne 0x40cb9d
mov eax, dword [ebp - 0x1074]
test eax, eax
je 0x40c855
push 0
lea ecx, [ebp - 0x1064]
mov dword [ebp - 0x105c], 0
push ecx
lea ecx, [ebp - 0x105c]
mov dword [ebp - 0x1064], 4
push ecx
push 0x20000005
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x40c855
mov eax, dword [ebp - 0x105c]
mov dword [ebp - 0x1064], 0
jmp 0x40c866
xorps xmm0, xmm0
movlpd qword [ebp - 0x1068], xmm0
mov eax, dword [ebp - 0x1068]
mov dword [ebp - 0x1058], eax
test eax, eax
je 0x40cb9d
mov ecx, dword [edi + 0x68]
mov dword [ebp - 0x107c], ecx
test ecx, ecx
je 0x40c8a1
push ecx
call fcn.0045ec79
mov eax, dword [ebp - 0x1058]
add esp, 4
mov dword [edi + 0x68], 0
mov dword [ebp - 0x107c], 0
cmp dword [edi + 0x30], 0
jne 0x40c8be
push eax
mov dword [edi + 0x6c], eax
call fcn.0045ec70
mov ecx, eax
add esp, 4
mov dword [ebp - 0x107c], ecx
mov dword [edi + 0x68], ecx
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [ebp - 0x1064], eax
test ecx, ecx
je 0x40c93b
cmp dword [esi + 0x14], 8
jb 0x40c8d7
mov edx, dword [esi]
jmp 0x40c8d9
mov edx, esi
push dword [edi + 0x70]
mov eax, dword [ecx]
xorps xmm0, xmm0
sub esp, 8
movsd qword [esp], xmm0
push 0
push 0
push edx
call dword [eax + 0xc]
mov ecx, dword [edi]
push dword [edi + 0x70]
push dword [ebp - 0x1058]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [edi]
push dword [edi + 0x70]
push dword [ebp - 0x1064]
mov eax, dword [ecx]
call dword [eax + 8]
cmp dword [esi + 0x14], 8
jb 0x40c91b
mov edx, dword [esi]
jmp 0x40c91d
mov edx, esi
push dword [edi + 0x70]
mov ecx, dword [edi]
xorps xmm0, xmm0
sub esp, 8
mov eax, dword [ecx]
movsd qword [esp], xmm0
push 0
push dword [ebp - 0x1058]
push edx
call dword [eax + 0xc]
push 0x1000
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x105c], 0
push 0
push eax
call fcn.0056f980
mov eax, dword [ebp - 0x1058]
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x1030], eax
xorps xmm0, xmm0
mov dword [ebp - 0x102c], ecx
movlpd qword [ebp - 0x1028], xmm0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x1058]
xorps xmm0, xmm0
xor edx, edx
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x1034], eax
movups xmmword [ebp - 0x1020], xmm0
test ecx, ecx
je 0x40cb1d
mov ecx, dword [edi]
test ecx, ecx
je 0x40c9be
mov eax, dword [ecx]
push dword [edi + 0x70]
mov eax, dword [eax + 0x18]
call eax
test al, al
jne 0x40cae9
lea eax, [ebp - 0x1038]
push eax
push ecx
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x1078]
call fcn.0040db00
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c9ed
cmp dword [edi], 0
jne 0x40cb89
jmp 0x40cab5
test esi, esi
je 0x40caa7
cmp dword [edi + 0x30], 0
jne 0x40ca19
push esi
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x107c]
call fcn.0056ee80
add esp, 0xc
add dword [ebp - 0x107c], esi
jmp 0x40ca51
push 0
lea eax, [ebp - 0x1080]
mov dword [ebp - 0x1080], 0
push eax
push esi
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x106c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x1080], esi
je 0x40ca51
cmp dword [edi], 0
jne 0x40cb00
mov ecx, dword [edi]
test ecx, ecx
je 0x40cab5
mov esi, dword [ebp - 0x1060]
cmp dword [esi + 0x14], 8
jb 0x40ca67
mov edx, dword [esi]
jmp 0x40ca69
mov edx, esi
push dword [edi + 0x70]
movsd xmm0, qword [ebp - 0x1018]
mov eax, dword [ecx]
sub esp, 8
movsd qword [esp], xmm0
push dword [ebp - 0x1028]
push dword [ebp - 0x1058]
push edx
call dword [eax + 0xc]
mov ecx, dword [edi]
push dword [edi + 0x70]
mov eax, dword [ebp - 0x1028]
add eax, dword [ebp - 0x1064]
mov edx, dword [ecx]
push eax
call dword [edx + 8]
jmp 0x40cabb
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0x105c]
mov esi, dword [ebp - 0x1060]
xor edx, edx
cmp dword [ebp - 0x105c], 5
ja 0x40cb17
cmp dword [ebp - 0x1024], edx
ja 0x40cb17
jb 0x40c9a6
mov ecx, dword [ebp - 0x1058]
mov eax, dword [ebp - 0x1028]
cmp eax, ecx
jae 0x40cb25
jmp 0x40c9a6
push dword [edi + 0x70]
sub esp, 0x18
mov ecx, esp
push 0x60354c
call fcn.0040a5a0
jmp 0x40cbc7
push dword [edi + 0x70]
sub esp, 0x18
mov ecx, esp
push 0x603560
call fcn.0040a5a0
jmp 0x40cbc7
mov ecx, dword [ebp - 0x1058]
mov eax, dword [ebp - 0x1028]
cmp eax, ecx
jne 0x40cb84
cmp dword [ebp - 0x1024], edx
jne 0x40cb84
add dword [edi + 4], ecx
mov edx, dword [edi]
test edx, edx
je 0x40cb6a
cmp dword [esi + 0x14], 8
jb 0x40cb40
mov esi, dword [esi]
push dword [edi + 0x70]
movsd xmm0, qword [ebp - 0x1018]
mov eax, dword [edx]
sub esp, 8
movsd qword [esp], xmm0
push ecx
push ecx
push esi
mov ecx, edx
call dword [eax + 0xc]
mov ecx, dword [edi]
push dword [edi + 0x70]
push dword [edi + 4]
mov eax, dword [ecx]
call dword [eax + 8]
lea ecx, [ebp - 0x1078]
call fcn.0040d830
test ebx, ebx
je 0x40cb80
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov al, 1
jmp 0x40cbe6
cmp dword [edi], 0
je 0x40cbce
push dword [edi + 0x70]
sub esp, 0x18
mov ecx, esp
push 0x60353c
call fcn.0040a5a0
jmp 0x40cbc7
cmp dword [edi], 0
je 0x40cbce
push dword [edi + 0x70]
xor eax, eax
sub esp, 0x18
mov ecx, esp
push 0x60353c
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
mov word [ecx], ax
call fcn.0040a730
mov ecx, dword [edi]
mov eax, dword [ecx]
call dword [eax + 0x14]
lea ecx, [ebp - 0x1078]
call fcn.0040d830
test ebx, ebx
je 0x40cbe4
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045ef18
mov esp, ebp
pop ebp
ret 0xc
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
call fcn.00572b79
int3