Function at 0x4042ad
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 0x40b6b6
mov eax, dword fs:[0]
push eax
mov eax, 0x10750
call fcn.0040b460
mov eax, dword [0x410020]
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 [0x40c198]
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 0x404478
push edi
lea ecx, [ebp - 0x69c]
call dword [0x40c198]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
jae 0x4043fe
lea eax, [ebp - 0x698]
cmp byte [eax], 0x5c
jne 0x404441
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 0x404456
lea eax, [ebp - 0x698]
push eax
lea eax, [ebx + 8]
push eax
lea eax, [ebp - 0x578]
push 0x40c8d8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x578]
jmp 0x4044e8
lea eax, [ebp - 0x178]
push eax
mov edi, 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, esi
je 0x4049e6
cmp eax, edi
ja 0x4049e6
mov byte [ebp + eax - 0x177], 0
lea eax, [ebp - 0x680]
push eax
push esi
push 0x40c944
lea eax, [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4044e2
push 0x40c92c
lea eax, [ebx + 0x212]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x710], 1
jmp 0x404a0a
lea eax, [ebp - 0x680]
push eax
lea ecx, [ebp - 0x6f0]
call dword [0x40c198]
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 0x4045e3
push 4
jmp 0x4045e4
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, esi
mov dword [ebp - 0x714], eax
jne 0x404618
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 0x4044d3
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 0x40464a
push dword [ebp - 0x714]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x710], 1
xor esi, esi
jmp 0x404a0a
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 0x404712
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 0x4046ec
push 0x40c6ec
lea eax, [ebp - 0x560]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4046ec
lea eax, [ebp - 0x560]
push eax
push dword [ebp - 0x718]
push 0x40c97c
jmp 0x4046fd
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 0x404639
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
jae 0x404727
lea eax, [ebp - 0x698]
push 0x40c9d4
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 0x404766
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x6a0], 0x10
mov eax, dword [ebp - 0x6b4]
jae 0x40475c
lea eax, [ebp - 0x6b4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x404712
cmp byte [ebx + 0x317], 0
mov dword [ebp - 0x72c], esi
mov dword [ebp - 0x73c], 4
je 0x4047be
push edi
call dword [sym.imp.MSVCR80.dll_fclose]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
pop ecx
jae 0x40479c
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 0x404639
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 0x4047e8
mov dword [ebp - 0x72c], esi
cmp byte [ebx + 0x317], 0
jne 0x40477f
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 0x4048c3
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 0x40490e
call edi
mov ecx, eax
sub ecx, dword [ebp - 0x728]
cmp ecx, 0x32
jbe 0x40485b
mov dword [ebp - 0x728], eax
cmp dword [ebp - 0x730], 0
je 0x4049c5
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 0x4048ae
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 0x40481f
push dword [ebp - 0x718]
call dword [sym.imp.MSVCR80.dll_fclose]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
pop ecx
jae 0x4048f2
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 0x4049bb
push dword [ebp - 0x718]
call dword [sym.imp.MSVCR80.dll_fclose]
cmp dword [ebp - 0x684], 0x10
mov eax, dword [ebp - 0x698]
pop ecx
jae 0x404930
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 0x4049a0
push 0x40c6ec
lea eax, [ebp - 0x560]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4049a0
lea eax, [ebp - 0x560]
push eax
push 0x40c9d8
jmp 0x4049ab
push dword [ebp - 0x720]
push 0x40ca00
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 0x404a02
push 0x40c92c
lea eax, [ebx + 0x212]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [ebp - 0x710], 1
cmp dword [ebp - 0x710], esi
je 0x404a33
lea edi, [ebx + 0x212]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x404a2a
push esi
push 0x40c88c
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
push esi
push 0x4e21
jmp 0x404a3b
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.0040aa90
leave
ret 8