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

Disassembly:
mov r11, rsp
sub rsp, 0xa48
mov qword [rsp + 0xa8], 0xfffffffffffffffe
mov qword [r11 - 8], rbx
mov qword [r11 - 0x10], rsi
mov qword [r11 - 0x18], rdi
mov qword [r11 - 0x20], r12
mov qword [r11 - 0x28], r13
mov qword [r11 - 0x30], r14
mov qword [r11 - 0x38], r15
mov rax, qword [0x1005d650]
mov qword [rsp + 0xa00], rax
mov rbx, r9
mov r14d, r8d
mov r15, rdx
mov rax, qword [rsp + 0xa70]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x70], rax
mov r13, qword [rsp + 0xa78]
mov qword [rsp + 0x60], r13
mov byte [rsp + 0x160], 0
xor edx, edx
lea r8d, [rdx + 0x7f]
lea rcx, [r11 - 0x8e7]
call sub.msvcrt.dll_memset
mov rax, qword [r13 + 0x10]
mov ecx, dword [rax]
call qword [sym.imp.WS2_32.dll_ntohl]
add eax, 0xfdfffffe
cmp eax, 0xc
ja case.0x10031bb1.33554440
lea rdx, [0x10000000]
mov ecx, dword [rdx + rax*4 + 0x322ac]
add rcx, rdx
jmp rcx
mov dword [rsp + 0x30], 0x2000002
lea rax, str.MSG_SAC_GET_PORTAL
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, [0x1004ce88]
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov dword [rsp + 0x30], 0x2000003
lea rax, str.MSG_SAC_LOGIN
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, [0x1004ceb0]
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov dword [rsp + 0x30], 0x2000004
lea rax, str.MSG_SAC_LOGIN_CHOICE
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, [0x1004cee0]
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov dword [rsp + 0x30], 0x2000005
lea rax, str.MSG_SAC_GET_USERDATA
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, [0x1004cf10]
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov dword [rsp + 0x30], 0x2000006
lea rax, str.MSG_SAC_PUT_HOSTBIND
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, [0x1004cf40]
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov dword [rsp + 0x30], 0x2000007
lea rax, str.MSG_SAC_LOGOUT
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, [0x1004cf68]
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov dword [rsp + 0x30], 0x200000d
lea rax, str.MSG_SAC_HEART_BEAT
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, [0x1004cf98]
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov dword [rsp + 0x30], 0x200000e
lea rax, str.MSG_SAC_UPDATE_PASSWD
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, str._s__s:_d___s_0x_08x_
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
jmp 0x10031d9f
mov rax, qword [r13 + 0x10]
mov ecx, dword [rax]
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], r14d
mov r9, r15
mov r8, rbx
lea rdx, str._s__s:_d__Unkown_0x_08x_
lea rcx, [rsp + 0x160]
call qword [sym.imp.msvcrt.dll_sprintf]
lea r8, [rsp + 0x160]
lea rdx, [0x10048184]
lea rcx, [rsp + 0xc0]
call qword [sym.imp.msvcrt.dll_sprintf]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x140], eax
mov rcx, qword [0x10069720]
test rcx, rcx
jne 0x10031e04
lea rcx, [0x1004d6dc]
call fcn.10021950
mov qword [0x10069720], rax
xor ecx, ecx
call fcn.10020990
xor edx, edx
mov rcx, qword [0x10069720]
call fcn.10020b40
mov rcx, qword [0x10069720]
lea r8, [rsp + 0xc0]
lea rdx, str._ts__job__s__start
call fcn.10021a00
mov dword [rsp + 0x54], 0xffffffff
mov byte [rsp + 0x600], 0
xor edx, edx
mov r8d, 0x3ff
lea rcx, [rsp + 0x601]
call sub.msvcrt.dll_memset
mov rbx, qword [r13 + 0x10]
mov ecx, dword [r13 + 0x18]
sub ecx, ebx
sub ecx, 8
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbx + 4], eax
mov rax, qword [r13 + 0x18]
sub rax, qword [r13 + 0x10]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x78], rax
mov byte [rsp + 0x1e0], 0
mov rcx, qword [r13 + 0x10]
lea rdx, [rsp + 0x1e0]
mov rax, qword [rcx + 8]
mov qword [rdx], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x20]
mov qword [rdx + 0x18], rax
mov byte [rsp + 0x200], 0
xor edx, edx
mov r8d, 0x3ff
lea rcx, [rsp + 0x201]
call sub.msvcrt.dll_memset
mov byte [rsp + 0x150], 0
xor eax, eax
mov qword [rsp + 0x151], rax
mov dword [rsp + 0x159], eax
mov word [rsp + 0x15d], ax
mov byte [rsp + 0x15f], al
xor ebx, ebx
mov dword [rsp + 0x58], ebx
cmp ebx, 0x20
jge 0x10031f39
movsxd rax, ebx
movzx r9d, byte [rsp + rax + 0x1e0]
lea r8, [0x1004cffc]
mov edx, reloc.WS2_32.dll_recv
lea rcx, [rsp + 0x150]
call fcn.1001ff70
mov r8d, 0x3ff
lea rdx, [rsp + 0x150]
lea rcx, [rsp + 0x200]
call qword [sym.imp.msvcrt.dll_strncat]
mov byte [rsp + 0x5ff], 0
inc ebx
mov dword [rsp + 0x58], ebx
jmp 0x10031ee3
xor eax, eax
mov byte [rsp + 0x50], al
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x200]
lea rcx, [rsp + 0x88]
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const____ptr64__class_std::allocator_char__const____ptr64____ptr64]
mov rdi, qword [rsp + 0x98]
mov qword [rsp + 0xb0], rdi
cmp edi, 0x12
jle 0x10031f99
lea ebx, [rdi - 0x12]
mov dword [rsp + 0x5c], ebx
lea eax, [rdi - 8]
cmp ebx, eax
jge 0x10031f99
movsxd rdx, ebx
lea rcx, [rsp + 0x88]
call qword [sym.imp.msvcp60.dll_public:_char____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator___unsigned_long_long_unsigned___int64_____ptr64]
mov byte [rax], 0x2a
inc ebx
mov dword [rsp + 0x5c], ebx
jmp 0x10031f76
mov r12, qword [rsp + 0x90]
test r12, r12
cmove r12, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov rbx, qword [r13 + 0x10]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
mov edi, eax
lea rsi, [rbx + 8]
mov ecx, dword [rbx]
call qword [sym.imp.WS2_32.dll_ntohl]
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], 0x2fffc0
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], eax
mov r9d, r14d
mov r8, r15
lea rdx, str._sac__SSLMSG_One__s__d__x__p__d__d__s_
mov rcx, qword [0x10069720]
call fcn.10021cd0
mov r12, qword [rsp + 0x90]
test r12, r12
cmove r12, qword [sym.imp.msvcp60.dll_char_const__private:_static_char_const____ptr64___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov rsi, qword [r13 + 0x10]
mov ecx, dword [rsi + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ebx, eax
lea rdi, [rsi + 8]
mov ecx, dword [rsi]
call qword [sym.imp.WS2_32.dll_ntohl]
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x38], 0x2fffc0
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
mov r9d, r14d
mov r8, r15
lea rdx, str._vpnops__sac__Send_ssl_msg__s__d__x__p__d__d__s_
mov rcx, qword [0x10069720]
call fcn.10021cd0
mov rsi, qword [r13 + 0x10]
mov ecx, dword [rsi + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ebx, eax
mov ecx, dword [rsi]
call qword [sym.imp.WS2_32.dll_ntohl]
mov r8d, eax
mov dword [rsp + 0x28], 0x2fffc0
mov dword [rsp + 0x20], ebx
lea r9, [rsi + 8]
mov edx, r14d
mov rcx, r15
call fcn.1003cd70
mov ebx, eax
mov dword [rsp + 0x54], eax
mov r8d, eax
lea rdx, str._sac__SSLMSG_One_result_d
mov rcx, qword [0x10069720]
call fcn.10021cd0
mov r8d, ebx
lea rdx, str._vpnops__sac__Send_ssl_msg_result_d
mov rcx, qword [0x10069720]
call fcn.10021cd0
lea rcx, [rsp + 0x88]
call qword [sym.imp.msvcp60.dll_public:_void___cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void____ptr64]
nop
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x80]
jmp 0x100320f3
test ebx, ebx
jle 0x100321d4
mov rax, qword [r13 + 0x10]
mov qword [r13 + 0x18], rax
lea rdx, [0x1004d114]
mov rcx, r13
call fcn.100344f0
mov rax, qword [r13 + 0x18]
mov ecx, dword [rax]
add rax, 4
mov qword [r13 + 0x18], rax
call qword [sym.imp.WS2_32.dll_ntohl]
mov ebx, eax
mov r9d, eax
lea r8, [rsp + 0x160]
lea rdx, str._sacmsg__sac_broker_send_to_device__s._sac_reply0x_08x
mov rcx, qword [0x10069720]
call fcn.10021a00
mov r9d, ebx
lea r8, [rsp + 0x160]
lea rdx, str._vpnops__sacmsg__Sac_broker_send_to_device__s._sac_reply0x_08x
mov rcx, qword [0x10069720]
call fcn.10021a00
mov dword [rsi], ebx
test ebx, ebx
jne 0x10032171
mov ebx, edi
jmp 0x10032230
mov r9d, ebx
lea r8, [rsp + 0x160]
lea rdx, str._s_fail__SAC_reply_0x_08x.
lea rcx, [rsp + 0x600]
call qword [sym.imp.msvcrt.dll_sprintf]
mov r9d, ebx
lea r8, [rsp + 0x160]
lea rdx, str._sacmsg__sac_broker_send_to_device__s_failed._sac_reply0x_08x
mov rcx, qword [0x10069720]
call fcn.10021cd0
mov r9d, ebx
lea r8, [rsp + 0x160]
lea rdx, str._vpnops__sacmsg__Sac_broker_send_to_device__s_failed._sac_reply0x_08x
mov rcx, qword [0x10069720]
call fcn.10021cd0
mov ebx, 0xffffffff
jmp 0x10032230
mov dword [rsi], 0xa95f74
mov r9d, ebx
lea r8, [rsp + 0x160]
lea rdx, str.sac_broker_send_to_device__s_failed__connection_error:__d.
lea rcx, [rsp + 0x600]
call qword [sym.imp.msvcrt.dll_sprintf]
lea r8, [rsp + 0x160]
lea rdx, str._sac__sac_broker_send_to_device__s_failed:_connection_error.
mov rcx, qword [0x10069720]
call fcn.10021cd0
lea r8, [rsp + 0x160]
lea rdx, str._vpnops__sac__Sac_broker_send_to_device__s_failed:_connection_error.
mov rcx, qword [0x10069720]
call fcn.10021cd0
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x140]
mov r9d, eax
lea r8, [rsp + 0xc0]
lea rdx, str._ts__job__s__finised__time_elapsed__d_ms
mov rcx, qword [0x10069720]
call fcn.10021a00
mov eax, ebx
mov rcx, qword [rsp + 0xa00]
call fcn.10044fa0
mov rbx, qword [rsp + 0xa40]
mov rsi, qword [rsp + 0xa38]
mov rdi, qword [rsp + 0xa30]
mov r12, qword [rsp + 0xa28]
mov r13, qword [rsp + 0xa20]
mov r14, qword [rsp + 0xa18]
mov r15, qword [rsp + 0xa10]
add rsp, 0xa48
ret