Function at 0x4036d1
Capabilities:
Connect to http server
Delete file
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
mov dword [ebp - 0x144], ecx
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x144]
cmp dword [eax + 0x68], 0x1bb
jne 0x4036fa
mov dword [ebp - 0x18], 0x803000
mov eax, dword [ebp - 0x144]
mov eax, dword [eax + 0x44]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x144]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x144]
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0xa4], eax
mov eax, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0xac], eax
push 0
push 0
mov eax, dword [ebp - 0x144]
push dword [eax + 0x6c]
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
mov eax, dword [ebp - 0x144]
movzx eax, word [eax + 0x68]
push eax
push dword [ebp - 0xa4]
mov eax, dword [ebp - 0x144]
push dword [eax]
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x60], 0
je 0x40379a
cmp dword [ebp - 0x60], 0xffffffff
je 0x40379a
mov dword [ebp - 0x148], 1
jmp 0x4037a1
and dword [ebp - 0x148], 0
movzx eax, byte [ebp - 0x148]
test eax, eax
jne 0x4037c0
mov byte [ebp - 0x75], 1
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x75]
jmp 0x403fa2
mov eax, dword [ebp - 0x144]
add eax, 0x58
push eax
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x144]
add ecx, 0x50
call fcn.00408573
mov eax, dword [ebp - 0x144]
cmp dword [eax + 0x6c], 3
je 0x403811
mov byte [ebp - 0x76], 1
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xb0], eax
push dword [ebp - 0xb0]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x76]
jmp 0x403fa2
mov dword [ebp - 0x38], 0x409544
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0xb8], eax
mov eax, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0xc0], eax
push 0
push dword [ebp - 0x18]
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push dword [ebp - 0xb4]
push 0x409540
push dword [ebp - 0xb8]
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x44], 0
je 0x40388d
cmp dword [ebp - 0x44], 0xffffffff
je 0x40388d
mov dword [ebp - 0x14c], 1
jmp 0x403894
and dword [ebp - 0x14c], 0
movzx eax, byte [ebp - 0x14c]
test eax, eax
jne 0x4038d0
mov byte [ebp - 0x77], 1
lea ecx, [ebp - 0x44]
call fcn.00401e2d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xc4], eax
push dword [ebp - 0xc4]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x77]
jmp 0x403fa2
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0xc8], eax
push 0
push 0
push 0
push 0
push dword [ebp - 0xc8]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x4038fa
and dword [ebp - 0x150], 0
jmp 0x403906
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x150], eax
mov eax, dword [ebp - 0x150]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x403946
mov byte [ebp - 0x78], 1
lea ecx, [ebp - 0x44]
call fcn.00401e2d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xcc], eax
push dword [ebp - 0xcc]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x78]
jmp 0x403fa2
push dword [ebp - 0x44]
mov ecx, dword [ebp - 0x144]
call fcn.0040304f
mov ecx, dword [ebp - 0x144]
call fcn.0040310c
push str.Content_Type:
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x144]
call fcn.0040318d
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xd0], eax
mov edx, str.html
mov ecx, dword [ebp - 0xd0]
call fcn.004089cd
test eax, eax
jne 0x4039ca
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xd4], eax
mov edx, 0x4095b4
mov ecx, dword [ebp - 0xd4]
call fcn.004089cd
test eax, eax
jne 0x4039ca
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xd8], eax
mov edx, str.plain
mov ecx, dword [ebp - 0xd8]
call fcn.004089cd
test eax, eax
je 0x403a3d
mov eax, dword [ebp - 0x144]
and dword [eax + 0x20], 0
mov eax, dword [ebp - 0x144]
and dword [eax + 0x24], 0
cmp dword [ebp + 0xc], 0
je 0x4039f7
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
push 3
pop edx
mov ecx, dword [ebp + 0x10]
call dword [ebp + 0xc]
mov byte [ebp - 0x79], 0
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xdc], eax
push dword [ebp - 0xdc]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x44]
call fcn.00401e2d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xe0], eax
push dword [ebp - 0xe0]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x79]
jmp 0x403fa2
push str.Content_Length:
lea eax, [ebp - 0x84]
push eax
mov ecx, dword [ebp - 0x144]
call fcn.0040318d
mov dword [ebp - 0xe4], eax
mov eax, dword [ebp - 0xe4]
mov eax, dword [eax + 4]
mov dword [ebp - 0xe8], eax
mov ecx, dword [ebp - 0xe8]
call fcn.0040875e
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0xec], eax
push dword [ebp - 0xec]
call fcn.00401eb5
pop ecx
cmp dword [ebp - 0x6c], 0
jne 0x403a99
mov dword [ebp - 0x6c], 0x186a0
mov ecx, dword [ebp - 0x144]
call fcn.0040324f
mov dword [ebp - 0xc], eax
push str.Last_Modified:
lea eax, [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0x144]
call fcn.0040318d
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xf0]
mov eax, dword [eax + 4]
mov dword [ebp - 0xf4], eax
mov ecx, dword [ebp - 0xf4]
call fcn.004027c9
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], edx
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0xf8], eax
push dword [ebp - 0xf8]
call fcn.00401eb5
pop ecx
cmp dword [ebp - 0xc], 0xc8
je 0x403b69
mov byte [ebp - 0x95], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xfc], eax
push dword [ebp - 0xfc]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x44]
call fcn.00401e2d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x100], eax
push dword [ebp - 0x100]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x95]
jmp 0x403fa2
mov eax, dword [ebp - 0x144]
and dword [eax + 0x24], 0
mov eax, dword [ebp - 0x144]
mov ecx, dword [ebp - 0x6c]
mov dword [eax + 0x20], ecx
mov byte [ebp - 0x65], 0
cmp dword [ebp + 0xc], 0
je 0x403ba7
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
xor edx, edx
inc edx
mov ecx, dword [ebp + 0x10]
call dword [ebp + 0xc]
movzx eax, al
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x65], al
movzx eax, byte [ebp - 0x65]
test eax, eax
je 0x403c0e
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
push 2
pop edx
mov ecx, dword [ebp + 0x10]
call dword [ebp + 0xc]
mov byte [ebp - 0x96], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x104], eax
push dword [ebp - 0x104]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x44]
call fcn.00401e2d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x108], eax
push dword [ebp - 0x108]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x96]
jmp 0x403fa2
push 0
push 2
push 4
push 0
push 1
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x403c7b
mov byte [ebp - 0x97], 1
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10c], eax
push dword [ebp - 0x10c]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x44]
call fcn.00401e2d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x110], eax
push dword [ebp - 0x110]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x97]
jmp 0x403fa2
mov eax, dword [ebp - 0x6c]
cdq
push 0x64
pop ecx
idiv ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x28], 0x1400000
cmp dword [ebp - 0x30], 0
jne 0x403c9b
mov dword [ebp - 0x30], 0x1400000
cmp dword [ebp - 0x30], 0x1400000
jle 0x403cab
mov dword [ebp - 0x30], 0x1400000
push dword [ebp - 0x30]
lea ecx, [ebp - 0x58]
call fcn.004084c7
and dword [ebp - 0x24], 0
and dword [ebp - 0x14], 0
and dword [ebp - 0x2c], 0
push 0
lea ecx, [ebp - 0x4d]
call fcn.00401c60
mov byte [ebp - 0x39], 0
xor eax, eax
inc eax
je 0x403f03
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x114], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x114]
push dword [ebp - 0x118]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x403d11
and dword [ebp - 0x154], 0
jmp 0x403d1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x154], eax
mov eax, dword [ebp - 0x154]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x14], 0
jne 0x403d32
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
push 0
lea ecx, [ebp - 0x74]
call fcn.004084c7
push dword [ebp - 0x6c]
push dword [ebp - 0x24]
push dword [ebp - 0x14]
push dword [ebp - 0x30]
push dword [ebp - 0x10]
push str.code:__d__requested__d_bytes__read__d_bytes__total:__d_of__d
lea eax, [ebp - 0x74]
push eax
call fcn.0040869d
add esp, 0x1c
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x11c], eax
push dword [ebp - 0x11c]
lea ecx, [ebp - 0x4d]
call fcn.00401d20
mov ecx, eax
call fcn.00401e0a
cmp dword [ebp - 0x14], 0
je 0x403df2
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x120], eax
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x120]
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403db7
and dword [ebp - 0x158], 0
jmp 0x403dc3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x158], eax
mov eax, dword [ebp - 0x158]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x2c]
je 0x403df2
mov byte [ebp - 0x39], 1
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x124], eax
push dword [ebp - 0x124]
call fcn.00401eb5
pop ecx
jmp 0x403f03
push dword [ebp + 8]
mov ecx, dword [ebp - 0x144]
add ecx, 0x10
call fcn.0040853c
mov eax, dword [ebp - 0x144]
mov ecx, dword [ebp - 0x6c]
mov dword [eax + 0x20], ecx
mov eax, dword [ebp - 0x144]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x24], ecx
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x6c]
jne 0x403e5b
cmp dword [ebp + 0xc], 0
je 0x403e3c
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
push 3
pop edx
mov ecx, dword [ebp + 0x10]
call dword [ebp + 0xc]
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x128], eax
push dword [ebp - 0x128]
call fcn.00401eb5
pop ecx
jmp 0x403f03
cmp dword [ebp - 0x14], 0
jne 0x403e93
cmp dword [ebp + 0xc], 0
je 0x403e7a
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
push 4
pop edx
mov ecx, dword [ebp + 0x10]
call dword [ebp + 0xc]
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x12c], eax
push dword [ebp - 0x12c]
call fcn.00401eb5
pop ecx
jmp 0x403f03
cmp dword [ebp + 0xc], 0
je 0x403eb7
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
xor edx, edx
inc edx
mov ecx, dword [ebp + 0x10]
call dword [ebp + 0xc]
movzx eax, al
neg eax
sbb eax, eax
inc eax
mov byte [ebp - 0x65], al
movzx eax, byte [ebp - 0x65]
test eax, eax
je 0x403ee9
mov eax, dword [ebp - 0x144]
add eax, 0x10
push eax
push 2
pop edx
mov ecx, dword [ebp + 0x10]
call dword [ebp + 0xc]
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x130], eax
push dword [ebp - 0x130]
call fcn.00401eb5
pop ecx
jmp 0x403f03
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x134], eax
push dword [ebp - 0x134]
call fcn.00401eb5
pop ecx
jmp 0x403cd0
lea eax, [ebp - 8]
push eax
push 0
push 0
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x80
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
movzx eax, byte [ebp - 0x39]
test eax, eax
je 0x403f3c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov al, byte [ebp - 0x39]
mov byte [ebp - 0x98], al
lea ecx, [ebp - 0x4d]
call fcn.00401cb8
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x138], eax
push dword [ebp - 0x138]
call fcn.00401eb5
pop ecx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x13c], eax
push dword [ebp - 0x13c]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x44]
call fcn.00401e2d
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x140], eax
push dword [ebp - 0x140]
call fcn.00401eb5
pop ecx
lea ecx, [ebp - 0x60]
call fcn.00401e2d
mov al, byte [ebp - 0x98]
leave
ret 0xc