Function at 0x404d24
Capabilities:
Get common file path
Read .ini file
Read and send data from client to server
Send data
Send data on socket

Disassembly:
mov eax, 0x40e59b
call fcn.0040dca0
sub esp, 0x1b0
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
push esi
push edi
cmp eax, dword [ebx + 0x20c]
jne 0x40518e
mov eax, dword [ebx + 0x378]
mov edx, dword [ebx + 0x37c]
mov esi, dword [ebx + 0x380]
cmp dword [ebx + 0x2e8], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x28], esi
je 0x4057eb
and byte [ebp - 0x68], 0
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x67]
cmp byte [ebx + 0x5d4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x404da2
push 0x412764
lea eax, [ebp - 0x68]
push 0x20
push eax
call fcn.00401581
add esp, 0xc
jmp 0x404ea8
cmp edx, 0x100000
jb 0x404dd4
and dword [ebp - 0x10], 0
mov dword [ebp - 0x14], edx
fild qword [ebp - 0x14]
push ecx
push ecx
lea eax, [ebp - 0x68]
fmul qword [0x40f3b8]
fstp qword [esp]
push str._.1f_MB_
push 0x20
push eax
call fcn.00401581
add esp, 0x14
jmp 0x404e0d
cmp edx, 0x400
jb 0x404df9
and dword [ebp - 0x10], 0
mov dword [ebp - 0x14], edx
fild qword [ebp - 0x14]
fmul qword [0x40f3b0]
call sub.MSVCRT.dll__ftol
push eax
push str._d_KB_
jmp 0x404dff
push edx
push str._d_B_
lea eax, [ebp - 0x68]
push 0x20
push eax
call fcn.00401581
add esp, 0x10
lea esi, [ebx + 0x3b0]
mov dword [ebp + 8], 2
mov edi, 0x4158e8
cmp dword [esi], 0xffffffff
je 0x404e96
mov dword [0x4158e8], 0x2539
mov dword [0x4158ec], 0x210
mov eax, dword [ebx + 0x3ac]
push 0
mov dword [0x4158f0], eax
mov eax, dword [ebx + 0x5cc]
mov dword [0x4158f8], eax
mov eax, dword [ebp - 0x24]
shr eax, 0xa
push 0x218
push edi
mov dword [0x4158fc], eax
mov dword [0x4158f4], 1
push dword [esi]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x404e7d
cmp eax, 4
jae 0x404e96
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.DownloadPercent:_send_error_d
push 0x415b20
call fcn.00409d3d
add esp, 0xc
add esi, 0x10c
dec dword [ebp + 8]
jne 0x404e1f
mov esi, dword [ebp - 0x28]
and byte [ebp - 0x88], 0
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x87]
cmp esi, 0x100000
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
jb 0x404ef4
and dword [ebp - 0x10], 0
mov dword [ebp - 0x14], esi
fild qword [ebp - 0x14]
push ecx
push ecx
lea eax, [ebp - 0x88]
fmul qword [0x40f3b8]
fstp qword [esp]
push str._.1f_MB_
push 0x20
push eax
call fcn.00401581
add esp, 0x14
jmp 0x404f30
cmp esi, 0x400
jb 0x404f19
and dword [ebp - 0x10], 0
mov dword [ebp - 0x14], esi
fild qword [ebp - 0x14]
fmul qword [0x40f3b0]
call sub.MSVCRT.dll__ftol
push eax
push str._d_KB_
jmp 0x404f1f
push esi
push str._d_B_
lea eax, [ebp - 0x88]
push 0x20
push eax
call fcn.00401581
add esp, 0x10
mov al, byte [ebp + 0xb]
xor edi, edi
push edi
lea ecx, [ebp - 0x38]
mov byte [ebp - 0x38], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [ebp + 0xb]
push edi
lea ecx, [ebp - 0x48]
mov dword [ebp - 4], edi
mov byte [ebp - 0x48], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x88]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.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__::assign_char_const___unsigned_int_]
mov al, byte [ebp + 0xb]
mov byte [ebp - 4], 1
push edi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x68]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x1c]
call dword [sym.imp.MSVCP60.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__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x98]
push 0x412718
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
push 0x41270c
push eax
lea eax, [ebp - 0xb8]
mov byte [ebp - 4], 3
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 4
push ecx
push eax
lea eax, [ebp - 0xa8]
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0x24
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [ebp - 4], 5
push dword [ecx]
lea ecx, [ebp - 0x38]
push edi
push eax
call dword [sym.imp.MSVCP60.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__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [ebp - 0xa8]
pop esi
mov byte [ebp - 4], 4
push esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov byte [ebp - 4], 2
push esi
lea ecx, [ebp - 0x98]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push esi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
and byte [ebp - 4], 0
push esi
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [ebp - 0x34]
cmp eax, edi
jne 0x40505b
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov edi, dword [sym.imp.USER32.dll_SetDlgItemTextA]
push eax
push 0x3fd
push dword [ebx + 0x3a0]
call edi
mov esi, 0x4134c4
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea esi, [ebx + 0x264]
mov ecx, esi
call dword [sym.imp.MSVCP60.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__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x68]
push eax
push 0x3f0
push dword [ebx + 0x3a0]
call edi
xor edi, edi
mov ecx, ebx
push edi
push dword [ebp - 0x20]
call fcn.004063d6
push dword [ebp - 0x24]
mov ecx, ebx
push edi
push dword [ebp - 0x20]
call fcn.004057fc
and byte [ebp - 0x180], 0
push 0x31
pop ecx
xor eax, eax
lea edi, [ebp - 0x17f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x68]
push eax
push 0x4126fc
lea eax, [ebp - 0x180]
push 0xc7
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [ebp - 0x180]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x14
mov ecx, esi
push eax
lea eax, [ebp - 0x180]
push eax
call dword [sym.imp.MSVCP60.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__::append_char_const___unsigned_int_]
cmp byte [ebx + 0x5d4], 0
je 0x405124
push 0x40
mov dword [ebx + 0x291], 7
push 0x4123d0
jmp 0x405154
mov eax, dword [ebx + 0x26c]
cmp eax, 0x40
ja 0x40517a
cmp byte [ebx + 0x23a], 0
je 0x40517a
mov dword [ebx + 0x291], 7
mov eax, dword [ebx + 0x268]
test eax, eax
jne 0x405151
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x40
push eax
lea eax, [ebx + 0x29d]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
and byte [ebx + 0x2dc], 0
add esp, 0xc
add ebx, 0x285
push ebx
push 1
call dword [sym.imp.SHELL32.dll_Shell_NotifyIconA]
or dword [ebp - 4], 0xffffffff
push 1
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x4057eb
cmp dword [ebx + 0x21c], eax
jne 0x4051bf
add dword [ebx + 0x224], 8
lea eax, [ebx + 0x224]
mov eax, dword [ebx + 0x224]
cmp eax, 0x58
jg 0x4057eb
push eax
mov ecx, ebx
call fcn.00407653
jmp 0x4057eb
cmp dword [ebx + 0x214], eax
jne 0x4051fa
mov edx, dword [ebx + 0x22c]
cmp edx, 0x46
jl 0x4051eb
mov ecx, dword [ebx + 0x230]
lea eax, [ebx + 0x230]
cmp ecx, 5
lea esi, [ecx + 1]
mov dword [eax], esi
jne 0x4051f2
and dword [eax], 0
inc edx
mov dword [ebx + 0x22c], edx
mov eax, dword [ebx + 0x22c]
jmp 0x405214
cmp dword [ebx + 0x218], eax
jne 0x405219
inc dword [ebx + 0x234]
lea eax, [ebx + 0x234]
mov eax, dword [ebx + 0x234]
cmp eax, 0x5f
jmp 0x4051ac
cmp dword [ebx + 0x388], eax
jne 0x4053a9
xor esi, esi
mov dl, 1
xor ecx, ecx
lea eax, [ebx + 0x3b0]
cmp dword [eax], 0xffffffff
jne 0x405243
inc ecx
add eax, 0x10c
cmp ecx, 2
jl 0x405231
jmp 0x405245
xor dl, dl
cmp dword [ebx + 0x5d0], esi
je 0x40537f
test dl, dl
je 0x405374
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [ebx + 0x5d0]
cmp eax, 0xea60
jbe 0x4057eb
cmp dword [ebx + 0x3ac], esi
jne 0x4057eb
cmp dword [0x415b00], esi
jle 0x4057eb
cmp dword [ebx + 0x3a4], esi
je 0x4057eb
and byte [ebp - 0x1bc], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x1bb]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x1bc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.._resdl.cfg
push esi
push str.curid
push str.share
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
mov dword [ebp + 8], eax
mov esi, 0x415b20
jne 0x4052ec
mov eax, dword [0x4138d4]
mov dword [ebx + 0x3ac], eax
jmp 0x405339
mov edx, dword [0x415b00]
xor ecx, ecx
test edx, edx
jle 0x405339
mov edi, 0x4138d4
mov eax, dword [ebp + 8]
cmp dword [edi], eax
jne 0x40530b
lea eax, [ecx + 1]
cmp eax, edx
jl 0x405315
inc ecx
add edi, 4
cmp ecx, edx
jl 0x4052fd
jmp 0x405339
mov eax, dword [ecx*4 + 0x4138d8]
mov dword [ebx + 0x3ac], eax
lea eax, [ecx + 2]
push eax
push str.PkgIndex___d
push esi
mov dword [0x415b04], eax
call fcn.00409d3d
add esp, 0xc
cmp dword [ebx + 0x3ac], 0
je 0x4057eb
mov ecx, ebx
call fcn.00409463
push dword [ebx + 0x3ac]
push 0x4126d8
push esi
call fcn.00409d3d
add esp, 0xc
mov ecx, ebx
call fcn.00408b03
and byte [ebx + 0x5d4], 0
jmp 0x4057eb
mov dword [ebx + 0x5d0], esi
jmp 0x4057eb
test dl, dl
je 0x4057eb
call dword [sym.imp.WINMM.dll_timeGetTime]
push 0x4126c4
push 0x415b20
mov dword [ebx + 0x5d0], eax
call fcn.00409d3d
pop ecx
pop ecx
jmp 0x4057eb
cmp dword [ebx + 0x394], eax
jne 0x4053c7
push dword [ebx + 0x5c8]
mov ecx, dword [ebx + 0x2e8]
call fcn.0040bde2
jmp 0x4057eb
cmp dword [ebx + 0x38c], eax
jne 0x405464
cmp byte [ebx + 0x11fd], 0
je 0x4057eb
lea eax, [ebp - 0x14]
mov ecx, ebx
push eax
call fcn.00408971
test eax, eax
je 0x4057eb
mov eax, dword [ebx + 0x2e0]
mov ecx, dword [ebx + 0x2e4]
add eax, 0x100000
push 0
adc ecx, 0
push 2
push ecx
push eax
call fcn.0040dd10
cmp edx, dword [ebp - 0x10]
ja 0x4057eb
jb 0x405426
cmp eax, dword [ebp - 0x14]
jae 0x4057eb
push dword [ebx + 0x3ac]
push 0x4126a0
push 0x415b20
call fcn.00409d3d
and byte [ebx + 0x11fd], 0
add esp, 0xc
mov ecx, ebx
call fcn.00408b03
and byte [ebx + 0x5d4], 0
push 0x4134c4
mov ecx, ebx
call fcn.0040946e
jmp 0x4057eb
cmp dword [ebx + 0x390], eax
jne 0x4054c4
push 2
lea esi, [ebx + 0x3b0]
pop ebx
cmp dword [esi], 0xffffffff
je 0x4054b6
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [esi + 4]
cmp eax, 0xea60
jbe 0x4054b6
lea edi, [esi + 8]
push edi
push dword [esi]
push str.sock_d
push 0x415b20
call fcn.00409d3d
or dword [esi], 0xffffffff
push 0x104
push 0
push edi
call sub.MSVCRT.dll_memset
add esp, 0x1c
and dword [esi + 4], 0
add esi, 0x10c
dec ebx
jne 0x405475
jmp 0x4057eb
cmp dword [ebx + 0x398], eax
lea esi, [ebx + 0x398]
jne 0x4055d1
push 0x412664
push 0x415b20
call fcn.00409d3d
pop ecx
pop ecx
push dword [esi]
push dword [ebx + 0x3a0]
call dword [sym.imp.USER32.dll_KillTimer]
cmp dword [ebx + 0x3ac], 0
jne 0x4057eb
mov eax, dword [ebx + 0x1418]
test eax, eax
je 0x4057eb
push eax
mov ecx, ebx
call fcn.00409673
test al, al
je 0x405569
mov eax, dword [ebx + 0x1418]
push 2
mov dword [ebx + 0x3ac], eax
lea eax, [ebx + 0x3b0]
pop edx
push 0x43
lea esi, [eax + 0xe50]
mov edi, eax
pop ecx
add eax, 0x10c
dec edx
rep movsd dword es:[edi], dword [esi]
jne 0x405531
mov ecx, ebx
call fcn.0040955a
push 0x4134c4
mov ecx, ebx
call fcn.0040946e
push 0
push 0
mov ecx, ebx
call fcn.00403bc6
jmp 0x4057eb
mov ecx, ebx
call fcn.00409463
mov eax, dword [ebx + 0x1418]
push 2
mov dword [ebx + 0x3ac], eax
lea eax, [ebx + 0x3b0]
pop edx
push 0x43
lea esi, [eax + 0xe50]
mov edi, eax
pop ecx
add eax, 0x10c
dec edx
rep movsd dword es:[edi], dword [esi]
jne 0x405585
mov ecx, ebx
call fcn.0040955a
push dword [ebx + 0x3ac]
push 0x412654
push 0x415b20
call fcn.00409d3d
add esp, 0xc
mov ecx, ebx
call fcn.00408b03
push 0x4134c4
mov ecx, ebx
call fcn.0040946e
jmp 0x405368
cmp dword [ebx + 0x39c], eax
jne 0x4057eb
mov esi, 0x415b20
push 0x412644
push esi
call fcn.00409d3d
pop ecx
pop ecx
push dword [ebx + 0x39c]
push dword [ebx + 0x3a0]
call dword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [ebx + 0x1420]
test eax, eax
je 0x4057eb
push eax
lea eax, [ebx + 0x1528]
push eax
lea eax, [ebx + 0x1424]
push eax
mov ecx, ebx
call fcn.00408c5a
push dword [ebx + 0x1420]
test al, al
je 0x405733
push 0x412628
push esi
call fcn.00409d3d
add esp, 0xc
mov dword [0x4158e8], 0x2539
mov dword [0x4158ec], 0x210
mov eax, dword [ebx + 0x1420]
push 0
mov edi, 0x4158e8
push 0x218
push edi
mov dword [0x4158f0], eax
mov dword [0x4158f8], 0x64
mov dword [0x4158f4], 2
push dword [ebx + 0x141c]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x405697
cmp eax, 4
jae 0x4056ac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x41260c
push esi
call fcn.00409d3d
add esp, 0xc
mov dword [0x4158e8], 0x2539
mov dword [0x4158ec], 0x210
mov eax, dword [ebx + 0x1420]
and dword [0x4158f8], 0
push 0x200
push 0
push 0x415900
mov dword [0x4158f0], eax
mov dword [0x4158f4], 3
call sub.MSVCRT.dll_memset
mov eax, dword [0x4158ec]
add esp, 0xc
add eax, 8
push 0
push eax
push edi
push dword [ebx + 0x141c]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x405712
cmp eax, 4
jae 0x405727
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x41260c
push esi
call fcn.00409d3d
add esp, 0xc
mov ecx, ebx
call fcn.0040953e
jmp 0x4057eb
push 0x4125f0
push esi
call fcn.00409d3d
mov dword [0x4158e8], 0x2539
mov dword [0x4158ec], 0x210
mov eax, dword [ebx + 0x1420]
and dword [0x4158f8], 0
push 0x200
mov edi, 0x415900
push 0
push edi
mov dword [0x4158f0], eax
mov dword [0x4158f4], 3
call sub.MSVCRT.dll_memset
add esp, 0x18
push 0x4125c0
push 0x200
push edi
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0xc
push 0
push 0x7530
push dword [ebx + 0x39c]
push dword [ebx + 0x3a0]
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, dword [0x4158ec]
push 0
add eax, 8
push eax
push 0x4158e8
push dword [ebx + 0x141c]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4057d6
cmp eax, 4
jae 0x4057eb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x41260c
push esi
call fcn.00409d3d
add esp, 0xc
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4