Function at 0x1002d470
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10046700
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9f8
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x51c], 0
mov ecx, 0x1f
xor eax, eax
lea edi, [ebp - 0x51b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebx + 8]
mov eax, dword [eax]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
add eax, 0xfdfffffe
cmp eax, 0xc
ja case.0x1002d4ca.33554440
jmp dword [eax*4 + 0x1002dd04]
push 0x2000002
push str.MSG_SAC_GET_PORTAL
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0x1004f84c
lea ecx, [ebp - 0x51c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
push 0x2000003
push str.MSG_SAC_LOGIN
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 0x1004f874
lea edx, [ebp - 0x51c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
push 0x2000004
push str.MSG_SAC_LOGIN_CHOICE
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0x1004f8a4
lea eax, [ebp - 0x51c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
push 0x2000005
push str.MSG_SAC_GET_USERDATA
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0x1004f8d4
lea ecx, [ebp - 0x51c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
push 0x2000006
push str.MSG_SAC_PUT_HOSTBIND
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 0x1004f904
lea edx, [ebp - 0x51c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
push 0x2000007
push str.MSG_SAC_LOGOUT
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0x1004f92c
lea eax, [ebp - 0x51c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
push 0x200000d
push str.MSG_SAC_HEART_BEAT
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
push 0x1004f958
lea ecx, [ebp - 0x51c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
push 0x200000e
push str.MSG_SAC_UPDATE_PASSWD
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push str._s__s:_d___s_0x_08x_
lea edx, [ebp - 0x51c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1002d672
mov eax, dword [ebx + 8]
mov eax, dword [eax]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
push str._s__s:_d__Unkown_0x_08x_
lea ecx, [ebp - 0x51c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
lea edx, [ebp - 0x51c]
push edx
push 0x1004ccac
lea eax, [ebp - 0x49c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x41c], eax
mov eax, dword [0x10065100]
test eax, eax
jne 0x1002d6c9
push 0x1004ffc8
call fcn.100261c0
mov dword [0x10065100], eax
push 0
call fcn.100261a0
add esp, 8
push 0
mov ecx, dword [0x10065100]
call fcn.10026490
lea ecx, [ebp - 0x49c]
push ecx
push str._ts__job__s__start
mov edx, dword [0x10065100]
push edx
call fcn.10026300
add esp, 0xc
mov dword [ebp - 0x14], 0xffffffff
mov byte [ebp - 0x418], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x417]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov esi, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
sub eax, esi
sub eax, 8
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esi + 4], eax
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
sub ecx, eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0
mov cl, byte [0x10065104]
mov byte [ebp - 0x53c], cl
mov dword [ebp - 0x988], eax
lea esi, [eax + 8]
mov ecx, 8
lea edi, [ebp - 0x53c]
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 0x94c], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x94b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x964], 0
xor edx, edx
mov dword [ebp - 0x963], edx
mov dword [ebp - 0x95f], edx
mov dword [ebp - 0x95b], edx
mov word [ebp - 0x957], dx
mov byte [ebp - 0x955], dl
xor esi, esi
mov dword [ebp - 0x950], esi
mov edi, dword [sym.imp.MSVCRT.dll_strncat]
cmp esi, 0x20
jge 0x1002d7e6
xor eax, eax
mov al, byte [ebp + esi - 0x53c]
push eax
push 0x1004f9bc
push 0x10
lea ecx, [ebp - 0x964]
push ecx
call fcn.1002d190
push 0x3ff
lea edx, [ebp - 0x964]
push edx
lea eax, [ebp - 0x94c]
push eax
call edi
add esp, 0x1c
mov byte [ebp - 0x54d], 0
inc esi
mov dword [ebp - 0x950], esi
jmp 0x1002d79c
mov cl, byte [ebp - 0x96c]
mov byte [ebp - 0x54c], cl
push 0
lea ecx, [ebp - 0x54c]
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 edi, [ebp - 0x94c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov dword [ebp - 0x990], esi
push 1
push esi
lea ecx, [ebp - 0x54c]
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x1002d85c
mov edi, dword [ebp - 0x548]
mov dword [ebp - 0x98c], edi
mov ecx, esi
lea esi, [ebp - 0x94c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, edx
push eax
lea ecx, [ebp - 0x54c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov edx, dword [ebp - 0x544]
mov dword [ebp - 0x994], edx
mov edi, edx
mov dword [ebp - 0x954], edi
cmp edx, 0x12
jle 0x1002d8e3
lea esi, [edx - 0x12]
mov dword [ebp - 0x968], esi
lea ecx, [edi - 8]
cmp esi, ecx
jge 0x1002d8e3
cmp edx, esi
jb 0x1002d8c6
mov eax, dword [ebp - 0x548]
test eax, eax
je 0x1002d8c6
mov cl, byte [eax - 1]
test cl, cl
je 0x1002d8b4
cmp cl, 0xff
je 0x1002d8b4
push 0
push edx
lea ecx, [ebp - 0x54c]
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
mov eax, dword [ebp - 0x548]
test eax, eax
je 0x1002d8c2
mov byte [eax - 1], 0xff
mov eax, dword [ebp - 0x548]
add eax, esi
jmp 0x1002d8cb
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 dword [ebp - 0x998], eax
mov byte [eax], 0x2a
inc esi
mov dword [ebp - 0x968], esi
mov edx, dword [ebp - 0x544]
jmp 0x1002d87e
mov ecx, dword [ebp - 0x548]
test ecx, ecx
jne 0x1002d8f3
mov ecx, 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 eax, dword [ebx + 8]
mov dword [ebp - 0x99c], eax
mov edi, eax
mov dword [ebp - 0x9a0], edi
mov dword [ebp - 0x9a4], eax
push ecx
push 0x2fffc0
mov edx, dword [eax + 4]
push edx
mov esi, dword [sym.imp.WS2_32.dll_ntohl]
call esi
push eax
add edi, 8
push edi
mov eax, dword [ebp - 0x9a4]
mov ecx, dword [eax]
push ecx
call esi
push eax
mov edi, dword [ebp + 0xc]
push edi
mov edx, dword [ebp + 8]
push edx
push str._sac__SSLMSG_One__s__d__x__p__d__d__s_
mov eax, dword [0x10065100]
push eax
call fcn.100263c0
add esp, 0x24
mov ecx, dword [ebp - 0x548]
test ecx, ecx
jne 0x1002d958
mov ecx, 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 eax, dword [ebx + 8]
mov dword [ebp - 0x9a8], eax
mov dword [ebp - 0x9ac], eax
mov dword [ebp - 0x9b0], eax
push ecx
push 0x2fffc0
mov ecx, dword [eax + 4]
push ecx
call esi
push eax
mov edx, dword [ebp - 0x9ac]
add edx, 8
push edx
mov eax, dword [ebp - 0x9b0]
mov ecx, dword [eax]
push ecx
call esi
push eax
push edi
mov edx, dword [ebp + 8]
push edx
push str._vpnops__sac__Send_ssl_msg__s__d__x__p__d__d__s_
mov eax, dword [0x10065100]
push eax
call fcn.100263c0
add esp, 0x24
mov eax, dword [ebx + 8]
mov dword [ebp - 0x9b4], eax
mov dword [ebp - 0x9b8], eax
mov dword [ebp - 0x9bc], eax
push 0x2fffc0
mov ecx, dword [eax + 4]
push ecx
call esi
push eax
mov edx, dword [ebp - 0x9b8]
add edx, 8
push edx
mov eax, dword [ebp - 0x9bc]
mov ecx, dword [eax]
push ecx
call esi
push eax
push edi
mov edx, dword [ebp + 8]
push edx
call fcn.100304d0
mov edi, eax
mov dword [ebp - 0x14], edi
push edi
push str._sac__SSLMSG_One_result_d
mov eax, dword [0x10065100]
push eax
call fcn.100263c0
push edi
push str._vpnops__sac__Send_ssl_msg_result_d
mov ecx, dword [0x10065100]
push ecx
call fcn.100263c0
add esp, 0x18
mov eax, dword [ebp - 0x548]
test eax, eax
je 0x1002da87
lea ecx, [eax - 1]
mov al, byte [ecx]
test al, al
je 0x1002da31
cmp al, 0xff
je 0x1002da31
dec al
mov byte [ecx], al
jmp 0x1002da87
mov edx, dword [ebp - 0x540]
add edx, 2
mov dword [ebp - 0x9c4], edx
mov dword [ebp - 0x9c0], ecx
push ecx
call fcn.100463e2
add esp, 4
jmp 0x1002da87
or ecx, 0xffffffff
mov dword [ebp - 4], ecx
test edi, edi
jle 0x1002dc6f
mov edx, dword [ebx + 8]
mov dword [ebx + 0xc], edx
mov edi, 0x1004fac8
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x9cc], ecx
mov dword [ebp - 0x9d4], eax
je 0x1002dbc6
movsx eax, byte [eax + 0x1004fac8]
add eax, 0xffffffbd
cmp eax, 0x17
ja case.0x1002dad4.73
xor ecx, ecx
mov cl, byte [eax + 0x1002dd54]
jmp dword [ecx*4 + 0x1002dd38]
inc dword [ebx + 0xc]
jmp case.0x1002dad4.73
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
add eax, 4
mov dword [ebx + 0xc], eax
push ecx
call esi
jmp case.0x1002dad4.73
push 0x80
mov edx, dword [ebx + 0x1c]
push edx
mov ecx, ebx
call fcn.100088d0
jmp case.0x1002dad4.73
mov eax, dword [ebx + 0xc]
mov cx, word [eax]
add eax, 2
mov dword [ebx + 0xc], eax
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
jmp case.0x1002dad4.73
mov ecx, 8
mov esi, dword [ebx + 0xc]
mov edi, dword [ebx + 0x1c]
rep movsd dword es:[edi], dword [esi]
add dword [ebx + 0xc], 0x20
jmp 0x1002dba7
mov edi, dword [ebx + 0x1c]
mov dword [ebp - 0x9f0], edi
mov ecx, 0xa00
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
add eax, 4
mov dword [ebx + 0xc], eax
push ecx
call esi
cmp eax, 0x2800
mov ecx, 0x2800
ja 0x1002db64
mov ecx, eax
mov dword [ebp - 0x9f4], ecx
mov esi, dword [ebx + 0xc]
mov edi, dword [ebp - 0x9f0]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
mov edx, dword [ebp - 0x9f0]
mov byte [ecx + edx], 0
mov ecx, eax
shr ecx, 2
lea edx, [ecx*4]
cmp edx, eax
je 0x1002dba4
lea eax, [ecx*4 + 4]
add dword [ebx + 0xc], eax
mov esi, dword [sym.imp.WS2_32.dll_ntohl]
mov eax, dword [ebp - 0x9d4]
inc eax
mov dword [ebp - 0x9d4], eax
cmp eax, dword [ebp - 0x9cc]
jb 0x1002dab9
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
add eax, 4
mov dword [ebx + 0xc], eax
push ecx
call esi
mov esi, eax
push esi
lea eax, [ebp - 0x51c]
push eax
push str._sacmsg__sac_broker_send_to_device__s._sac_reply0x_08x
mov ecx, dword [0x10065100]
push ecx
call fcn.10026300
push esi
lea edx, [ebp - 0x51c]
push edx
push str._vpnops__sacmsg__Sac_broker_send_to_device__s._sac_reply0x_08x
mov eax, dword [0x10065100]
push eax
call fcn.10026300
add esp, 0x20
mov ecx, dword [ebp + 0x14]
mov dword [ecx], esi
test esi, esi
jne 0x1002dc1b
mov edi, dword [ebp - 0x18]
jmp 0x1002dcc4
push esi
lea edx, [ebp - 0x51c]
push edx
push str._s_fail__SAC_reply_0x_08x.
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
push esi
lea ecx, [ebp - 0x51c]
push ecx
push str._sacmsg__sac_broker_send_to_device__s_failed._sac_reply0x_08x
mov edx, dword [0x10065100]
push edx
call fcn.100263c0
push esi
lea eax, [ebp - 0x51c]
push eax
push str._vpnops__sacmsg__Sac_broker_send_to_device__s_failed._sac_reply0x_08x
mov ecx, dword [0x10065100]
push ecx
call fcn.100263c0
add esp, 0x30
or edi, 0xffffffff
jmp 0x1002dcc4
mov edx, dword [ebp + 0x14]
mov dword [edx], 0xa95f74
push edi
lea eax, [ebp - 0x51c]
push eax
push str.sac_broker_send_to_device__s_failed__connection_error:__d.
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [ebp - 0x51c]
push edx
push str._sac__sac_broker_send_to_device__s_failed:_connection_error.
mov eax, dword [0x10065100]
push eax
call fcn.100263c0
lea ecx, [ebp - 0x51c]
push ecx
push str._vpnops__sac__Sac_broker_send_to_device__s_failed:_connection_error.
mov edx, dword [0x10065100]
push edx
call fcn.100263c0
add esp, 0x28
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x41c]
push eax
lea eax, [ebp - 0x49c]
push eax
push str._ts__job__s__finised__time_elapsed__d_ms
mov ecx, dword [0x10065100]
push ecx
call fcn.10026300
add esp, 0x10
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14