Function at 0x4042ec
Capabilities:
Check for time delay via gettickcount
Check internet connectivity via wininet
Create directory
Create http request
Delete file
Download and write a file
Get common file path
Get http content length
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 0xffffffffffffffff
push 0x40b6f6
mov eax, dword fs:[0]
push eax
mov eax, 0x10750
call fcn.0040b4a0
mov eax, dword [0x411020]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x718], eax
mov eax, dword [ebp + 0xc]
mov edi, ecx
xor esi, esi
lea ecx, [ebp - 0x70c]
mov dword [ebp - 0x728], eax
mov dword [ebp - 0x724], esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp - 0x6d4]
mov dword [ebp - 4], esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp - 0x69c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp - 0x6f0]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [ebp - 0x6b8]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
push dword [ebp - 0x718]
lea ecx, [ebp - 0x6d4]
mov byte [ebp - 4], 4
call dword [0x40d198]
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push dword [eax]
lea ecx, [ebp - 0x6d4]
push 0x2f
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char__unsigned_int_const]
mov ecx, dword [ebp - 0x6c0]
sub ecx, eax
dec ecx
push ecx
inc eax
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x6d4]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [ebp - 0x6d4]
mov byte [ebp - 4], 5
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
push 0x105
lea eax, [ebx + 0x212]
push esi
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
push esi
push esi
push 0x4e20
push dword [ebx]
call dword [sym.imp.USER32.dll_PostMessageA]
cmp edi, esi
mov dword [ebp - 0x710], esi
je 0x4044b7
push edi
lea ecx, [ebp - 0x69c]
call dword [0x40d198]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
jae 0x40443d
lea eax, [ebp - 0x698]
cmp byte [eax], 0x5c
jne 0x404480
mov eax, dword [ebp - 0x688]
dec eax
push eax
push 1
lea eax, [ebp - 0x758]
push eax
lea ecx, [ebp - 0x69c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [ebp - 0x69c]
mov byte [ebp - 4], 6
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp - 0x758]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
jae 0x404495
lea eax, [ebp - 0x698]
push eax
lea eax, [ebx + 8]
push eax
lea eax, [ebp - 0x578]
push 0x40d8c4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x578]
jmp 0x404527
lea eax, [ebp - 0x178]
push eax
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, esi
je 0x404a25
cmp eax, edi
ja 0x404a25
mov byte [ebp + eax - 0x177], 0
lea eax, [ebp - 0x680]
push eax
push esi
push 0x40d930
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x404521
push 0x40d918
lea eax, [ebx + 0x212]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x710], 1
jmp 0x404a49
lea eax, [ebp - 0x680]
push eax
lea ecx, [ebp - 0x6f0]
call dword [0x40d198]
lea eax, [ebp - 0x6f0]
push eax
lea ecx, [ebp - 0x6b8]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push dword [eax]
lea ecx, [ebp - 0x6b8]
push 0x5c
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char__unsigned_int_const]
mov edi, eax
lea eax, [ebp - 0x6b8]
push eax
lea ecx, [ebp - 0x69c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov eax, dword [ebp - 0x688]
sub eax, edi
dec eax
push eax
inc edi
push edi
lea eax, [ebp - 0x758]
push eax
lea ecx, [ebp - 0x69c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [ebp - 0x6b8]
mov byte [ebp - 4], 7
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp - 0x758]
mov byte [ebp - 4], 4
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea eax, [ebp - 0x6f0]
push eax
lea ecx, [ebp - 0x69c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov ecx, dword [ebp - 0x728]
lea eax, [ebp - 0x69c]
push eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push esi
lea eax, [ebp - 0x738]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
push 0x40
lea eax, [ebp - 0x70]
push esi
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
lea eax, [ebp - 0x70]
push str.Agent_ld
push eax
call edi
add esp, 0xc
test byte [ebp - 0x738], 4
push esi
push esi
lea eax, [ebp - 0x70]
push esi
jne 0x404622
push 4
jmp 0x404623
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, esi
mov dword [ebp - 0x714], eax
jne 0x404657
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [ebp - 0x720], eax
lea eax, [ebx + 0x212]
push str.InternetOpen
push eax
call edi
add esp, 0xc
jmp 0x404512
cmp byte [ebx + 0x317], 0
mov esi, str.Accept:___r_n_r_n
lea edi, [ebp - 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
je 0x404689
push dword [ebp - 0x714]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x710], 1
xor esi, esi
jmp 0x404a49
xor esi, esi
push esi
push 0x84000100
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x718]
push dword [ebp - 0x714]
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
cmp eax, esi
mov dword [ebp - 0x71c], eax
jne 0x404751
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x714]
mov dword [ebp - 0x720], eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea eax, [ebp - 0x724]
push eax
lea eax, [ebp - 0x560]
push eax
lea eax, [ebp - 0x720]
push eax
mov dword [ebp - 0x724], 0x3e7
call dword [sym.imp.WININET.dll_InternetGetLastResponseInfoA]
test eax, eax
je 0x40472b
push 0x40d6dc
lea eax, [ebp - 0x560]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x40472b
lea eax, [ebp - 0x560]
push eax
push dword [ebp - 0x718]
push 0x40d968
jmp 0x40473c
push dword [ebp - 0x720]
push dword [ebp - 0x718]
push str.InternetOpenUrl
lea eax, [ebx + 0x212]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x404678
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
jae 0x404766
lea eax, [ebp - 0x698]
push 0x40d9c0
push eax
call dword [sym.imp.MSVCR80.dll_fopen]
mov edi, eax
cmp edi, esi
pop ecx
pop ecx
mov dword [ebp - 0x718], edi
jne 0x4047a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x6a0], 0x10
mov eax, dword [ebp - 0x6b4]
jae 0x40479b
lea eax, [ebp - 0x6b4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x404751
cmp byte [ebx + 0x317], 0
mov dword [ebp - 0x72c], esi
mov dword [ebp - 0x73c], 4
je 0x4047fd
push edi
call dword [sym.imp.MSVCR80.dll_fclose]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
pop ecx
jae 0x4047db
lea eax, [ebp - 0x698]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x71c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x714]
call esi
jmp 0x404678
push esi
lea eax, [ebp - 0x73c]
push eax
lea eax, [ebp - 0x72c]
push eax
push 0x20000005
push dword [ebp - 0x71c]
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x404827
mov dword [ebp - 0x72c], esi
cmp byte [ebx + 0x317], 0
jne 0x4047be
push 0x10000
lea eax, [ebp - 0x10758]
push esi
push eax
call sub.MSVCR80.dll_memset
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
add esp, 0xc
call edi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x728], eax
jmp 0x404902
lea eax, [ebp - 0x730]
push eax
push 0x10000
lea eax, [ebp - 0x10758]
push eax
push dword [ebp - 0x71c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40494d
call edi
mov ecx, eax
sub ecx, dword [ebp - 0x728]
cmp ecx, 0x32
jbe 0x40489a
mov dword [ebp - 0x728], eax
cmp dword [ebp - 0x730], 0
je 0x404a04
push dword [ebp - 0x718]
lea eax, [ebp - 0x10758]
push 1
push dword [ebp - 0x730]
push eax
call dword [sym.imp.MSVCR80.dll_fwrite]
mov eax, dword [ebp - 0x724]
add eax, dword [ebp - 0x730]
mov ecx, dword [ebp - 0x72c]
add esp, 0x10
xor edx, edx
cmp ecx, 0x100000
mov dword [ebp - 0x724], eax
jbe 0x4048ed
shr eax, 0xa
shr ecx, 0xa
imul eax, eax, 0x64
div ecx
push eax
push 0
push 0x4e20
push dword [ebx]
call dword [sym.imp.USER32.dll_PostMessageA]
cmp byte [ebx + 0x317], 0
je 0x40485e
push dword [ebp - 0x718]
call dword [sym.imp.MSVCR80.dll_fclose]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
pop ecx
jae 0x404931
lea eax, [ebp - 0x698]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x71c]
call esi
push dword [ebp - 0x714]
call esi
jmp 0x4049fa
push dword [ebp - 0x718]
call dword [sym.imp.MSVCR80.dll_fclose]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
pop ecx
jae 0x40496f
lea eax, [ebp - 0x698]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x71c]
mov dword [ebp - 0x720], eax
call esi
push dword [ebp - 0x714]
call esi
lea eax, [ebp - 0x734]
push eax
lea eax, [ebp - 0x560]
push eax
lea eax, [ebp - 0x720]
push eax
mov dword [ebp - 0x734], 0x3e7
call dword [sym.imp.WININET.dll_InternetGetLastResponseInfoA]
test eax, eax
je 0x4049df
push 0x40d6dc
lea eax, [ebp - 0x560]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4049df
lea eax, [ebp - 0x560]
push eax
push 0x40d9c4
jmp 0x4049ea
push dword [ebp - 0x720]
push 0x40d9ec
lea eax, [ebx + 0x212]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [ebp - 0x710], 1
push dword [ebp - 0x718]
call dword [sym.imp.MSVCR80.dll_fclose]
pop ecx
push dword [ebp - 0x71c]
call esi
push dword [ebp - 0x714]
call esi
xor esi, esi
jmp 0x404a41
push 0x40d918
lea eax, [ebx + 0x212]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x710], 1
cmp dword [ebp - 0x710], esi
je 0x404a72
lea edi, [ebx + 0x212]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x404a69
push esi
push 0x40d878
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
push esi
push 0x4e21
jmp 0x404a7a
push 0x64
push esi
push 0x4e20
push dword [ebx]
call dword [sym.imp.USER32.dll_PostMessageA]
lea ecx, [ebp - 0x6b8]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x6f0]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x69c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x6d4]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x70c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp - 0x710]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040aad0
leave
ret 8