Function at 0x4089e0
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 0x41c483
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x425008]
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 esi, edx
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
mov dword [ebp - 4], ebx
cmp dword [edi + 0x10], 7
jbe 0x408a59
push 7
push ebx
lea eax, [ebp - 0x44]
push eax
call fcn.00402ae0
mov ebx, 1
cmp dword [eax + 0x14], 0x10
jb 0x408a43
mov eax, dword [eax]
push str.http:__
push eax
call fcn.0040b2d4
add esp, 8
mov byte [ebp - 0x48], 0
test eax, eax
je 0x408a5d
mov byte [ebp - 0x48], 1
test bl, 1
je 0x408a73
cmp dword [ebp - 0x30], 0x10
jb 0x408a73
push dword [ebp - 0x44]
call fcn.0040a3d1
add esp, 4
cmp byte [ebp - 0x48], 0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x408d6a
push 0xffffffffffffffff
push 7
lea eax, [ebp - 0x44]
mov ecx, edi
push eax
call fcn.00402ae0
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402980
cmp dword [ebp - 0x30], 0x10
jb 0x408aac
push dword [ebp - 0x44]
call fcn.0040a3d1
add esp, 4
push 1
push 0
lea eax, [ebp - 0x48]
mov byte [ebp - 0x48], 0x2f
push eax
lea ecx, [ebp - 0x2c]
call fcn.00407c90
mov dword [ebp - 0x50], eax
cmp eax, 0xffffffff
je 0x408d6a
lea ecx, [eax + 1]
push ecx
call fcn.0040925b
add esp, 4
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x408d6a
cmp dword [ebp - 0x18], 0x10
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x50]
cmovae ecx, dword [ebp - 0x2c]
push edx
push ecx
push eax
call fcn.00409f10
mov eax, dword [ebp - 0x50]
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
mov byte [ecx + eax], 0
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov dword [ebp - 0x58], ecx
lea eax, [ecx + 1]
push eax
call fcn.0040925b
mov ecx, eax
add esp, 4
mov dword [ebp - 0x54], ecx
test ecx, ecx
jne 0x408b33
push dword [ebp - 0x4c]
call fcn.0040b163
add esp, 4
jmp 0x408d6a
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
push dword [ebp - 0x58]
cmovae eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x50]
push eax
push ecx
call fcn.00409f10
mov ecx, dword [ebp - 0x54]
add esp, 0xc
mov eax, dword [ebp - 0x58]
mov edx, ecx
mov byte [ecx + eax], 0
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x58]
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, dword [ebp - 0x4c]
call fcn.004045e0
push dword [ebp - 0x4c]
call fcn.0040b163
add esp, 0x1c
push dword [ebp - 0x54]
call fcn.0040b163
mov eax, dword [ebp - 0x58]
add esp, 4
mov ecx, dword [ebp - 0x50]
test eax, eax
je 0x408d3e
test ecx, ecx
je 0x408d3e
cmp word [ebp + 8], 0
je 0x408be8
mov edx, ecx
mov ecx, eax
call fcn.00408960
movzx eax, ax
mov dword [ebp - 0x4c], eax
cmp ax, word [ebp + 8]
je 0x408bee
mov eax, dword [ebp - 0x58]
push eax
call fcn.0040b163
mov eax, dword [ebp - 0x4c]
add esp, 4
movzx eax, ax
push eax
movzx eax, word [ebp + 8]
push eax
push str.__37____35____4____38__0x_x___39__0x_x.__36__
push 0
call ebx
push eax
push 0xfd
jmp 0x408d53
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], eax
cmp dword [esi + 0x14], 0x10
jb 0x408bf8
mov eax, dword [esi]
jmp 0x408bfa
mov eax, esi
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 - 0x54], ecx
test ecx, ecx
je 0x408d0e
cmp ecx, 0xffffffff
je 0x408d0e
push 0
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x50]
mov eax, dword [ebp - 0x58]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x5c]
test eax, eax
mov eax, dword [ebp - 0x50]
je 0x408cdc
cmp ecx, eax
jne 0x408cdc
push dword [ebp - 0x58]
call fcn.0040b163
add esp, 4
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x14], 0x10
jb 0x408c6c
mov esi, dword [esi]
cmp dword [edi + 0x14], 0x10
jb 0x408c74
mov edi, dword [edi]
mov eax, dword [ebp - 0x4c]
movzx eax, ax
push eax
movzx eax, word [ebp + 8]
push eax
push dword [ebp - 0x50]
push esi
push edi
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 0x4225d3
call fcn.00401290
push eax
call fcn.004025a0
add esp, 0x2c
mov bl, 1
cmp dword [ebp - 0x18], 0x10
jb 0x408cbe
push dword [ebp - 0x2c]
call fcn.0040a3d1
add esp, 4
mov al, bl
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.00409264
mov esp, ebp
pop ebp
ret
push eax
push ecx
push str.__41____4____42___0x_x____34___0x_x.__36__
push 0
call ebx
push eax
push 0x10b
push 0x4225d3
push ecx
call fcn.00401290
add esp, 4
push eax
call fcn.004025a0
push dword [ebp - 0x58]
call fcn.0040b163
add esp, 0x24
jmp 0x408d6a
push str.__40____4____36__
push 0
call ebx
push eax
push 0x104
push 0x4225d3
push ecx
call fcn.00401290
add esp, 4
push eax
call fcn.004025a0
push dword [ebp - 0x58]
call fcn.0040b163
add esp, 0x1c
jmp 0x408d6a
movzx eax, word [ebp + 8]
push eax
push ecx
push str.__22____18____33____4____34____d____35___0x_x.__36__
push 0
call ebx
push eax
push 0xf2
push 0x4225d3
push ecx
call fcn.00401290
add esp, 4
push eax
call fcn.004025a0
add esp, 0x20
cmp dword [esi + 0x14], 0x10
jb 0x408d74
mov eax, dword [esi]
jmp 0x408d76
mov eax, esi
cmp dword [edi + 0x14], 0x10
jb 0x408d7e
mov edi, dword [edi]
push 0
push 0
push eax
push edi
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileA]
test eax, eax
je 0x408ded
mov esi, dword [0x428d1c]
test esi, esi
jne 0x408dc9
push 0xc8
call fcn.0040aff1
add esp, 4
mov dword [ebp - 0x54], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x408dbd
mov ecx, eax
call fcn.00401420
mov esi, eax
jmp 0x408dbf
xor esi, esi
mov byte [ebp - 4], 0
mov dword [0x428d1c], esi
push str.__43____4__
push 0
call ebx
push eax
push 0x119
push 0x4225d3
push esi
call fcn.004025a0
add esp, 0x18
xor bl, bl
jmp 0x408cad
push 0x7530
call dword [sym.imp.KERNEL32.dll_Sleep]
mov di, word [ebp + 8]
test di, di
je 0x408cab
cmp dword [esi + 0x14], 0x10
jb 0x408e0d
mov esi, dword [esi]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x408f0b
cmp esi, 0xffffffff
je 0x408f0b
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x4c], eax
call fcn.0040925b
add esp, 4
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x50]
push 0
push ecx
push dword [ebp - 0x4c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x408ecf
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x50], eax
jne 0x408ecf
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x54]
mov ecx, esi
mov edx, dword [ebp - 0x4c]
call fcn.00408960
movzx eax, ax
push esi
mov dword [ebp - 0x54], eax
call fcn.0040b163
mov eax, dword [ebp - 0x54]
add esp, 4
cmp ax, di
je 0x408cab
movzx eax, ax
push eax
movzx eax, di
push eax
push str.__37____35____4____38__0x_x___39__0x_x.
push 0
call ebx
push eax
push 0x136
push 0x4225d3
push ecx
call fcn.00401290
add esp, 4
push eax
call fcn.004025a0
add esp, 0x20
xor bl, bl
jmp 0x408cad
push str.__4____45____21__
push 0
call ebx
push eax
push 0x12b
push 0x4225d3
push ecx
call fcn.00401290
add esp, 4
push eax
call fcn.004025a0
push dword [ebp - 0x54]
call fcn.0040b163
add esp, 0x1c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
jmp 0x408cad
push str.__4____10____44____43____21__
push 0
call ebx
push eax
push 0x122
push 0x4225d3
push ecx
call fcn.00401290
add esp, 4
push eax
call fcn.004025a0
add esp, 0x18
xor bl, bl
jmp 0x408cad