Function at 0x4f3090
Capabilities:
Check for time delay via queryperformancecounter
Connect socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fd65b
mov eax, dword fs:[0]
push eax
sub esp, 0x1a8
mov eax, dword [0x519008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0xcc
lea eax, [ebp - 0x18c]
push 0
push eax
call fcn.00405490
add esp, 0xc
lea ecx, [ebp - 0x18c]
call fcn.004f4570
lea ecx, [esi + 0x130]
mov dword [ebp - 4], 0
lea edx, [ebp - 0x1ac]
call fcn.0042db20
lea ecx, [ebp - 0x18c]
call fcn.004f4220
mov ecx, dword [ebp - 0x1ac]
xor bl, bl
mov dword [ebp - 0x194], 0xffffffff
mov dword [ebp - 0x198], 0x2710
mov byte [eax + 0xc], 2
mov dword [eax], ecx
mov dword [eax + 0x10], 2
mov byte [ebp - 0x18d], bl
push 0x7d0
lea ecx, [ebp - 0x18c]
mov byte [ebp - 0xc4], 1
call fcn.004f3fd0
mov byte [ebp - 0xc4], 0
test al, al
je 0x4f319d
lea edi, [ebp - 0x144]
movzx ebx, al
mov edi, edi
mov ecx, dword [edi]
movzx eax, byte [ecx + 0xc]
sub eax, 2
jne 0x4f318f
cmp dword [ecx + 0x10], 2
jne 0x4f318f
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1b80
cmp dword [esi + 0x428], 0
je 0x4f318f
mov byte [ebp - 0x18d], 1
add edi, 4
sub ebx, 1
jne 0x4f3160
mov bl, byte [ebp - 0x18d]
test bl, bl
je 0x4f3133
push 0x2c4
lea eax, [esi + 0x154]
push 0
push eax
call fcn.00405490
add esp, 0xc
mov dword [esi + 0x150], 0
xor al, al
mov dword [ebp - 0x1a0], 0
mov byte [ebp - 0x18d], al
mov ebx, 2
mov dword [ebp - 0x1a4], 0
mov byte [esi + 0x148], al
jmp 0x4f31f6
mov al, byte [ebp - 0x18d]
test al, al
jne 0x4f347d
mov eax, dword [esi + 0x128]
push str.AlipayChinaCore::run_____opening_socket_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov ecx, dword [esi + 0x128]
add esp, 8
mov eax, dword [ecx]
cmp eax, vtable.rhea::NullLogger.0
jne 0x4f3c77
cmp dword [esi + 0x150], 0
mov byte [esi + 0x149], 0
mov dword [ebp - 0x1a0], 0
mov dword [ebp - 0x1a4], 0
mov dword [esi + 0x138], 0
mov dword [esi + 0x140], 0
mov dword [esi + 0x144], 0
je 0x4f3289
push 2
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1f70
push 0
push 0
push 3
push 0x1201
mov ecx, esi
call fcn.004f1a00
mov edx, dword [esi + 0x128]
movzx eax, word [esi + 0x20]
push eax
push esi
mov ecx, dword [edx]
push str.opening_socket_at__s:_d_n
push edx
call dword [ecx + 0xc]
movzx edi, word [esi + 0x20]
lea ecx, [ebp - 0x198]
add esp, 0x10
call fcn.004277d0
mov edx, eax
test edx, edx
jne 0x4f3380
push esi
mov word [ebp - 0xc0], bx
call dword [sym.imp.WS2_32.dll_inet_addr]
push edi
mov dword [ebp - 0xbc], eax
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebp - 0x194]
mov word [ebp - 0xbe], ax
lea eax, [ebp - 0xc0]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x4f33bd
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x194], 0xffffffff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2726
jg 0x4f3355
je 0x4f334e
cmp eax, 0x57
jg 0x4f3340
je 0x4f3339
sub eax, 6
je 0x4f3332
sub eax, 2
jne 0x4f3366
lea edx, [eax + 4]
jmp 0x4f3380
mov edx, 8
jmp 0x4f3380
mov edx, 0xf
jmp 0x4f3380
cmp eax, 0x271d
jne 0x4f3366
mov edx, 6
jmp 0x4f3380
mov edx, 7
jmp 0x4f3380
sub eax, 0x2740
je 0x4f337b
sub eax, 0xc
je 0x4f3374
sub eax, 1
je 0x4f336d
mov edx, 0xff
jmp 0x4f3380
mov edx, 0xd
jmp 0x4f3380
mov edx, 0xe
jmp 0x4f3380
mov edx, 5
mov eax, dword [esi + 0x128]
push edx
push str.error___d__n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov eax, dword [esi + 0x128]
push str.sleeping_for_a_while..._n
push eax
mov byte [ebp - 0x18d], 0
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 0x14
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4f3465
mov eax, dword [esi + 0x128]
push 0x50b7f4
push eax
mov byte [ebp - 0x18d], 1
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov edi, dword [0x51dd94]
add esp, 8
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
cmp eax, vtable.rhea::AllocatorSimple_class_rhea::AllocatorTrackingPolicy_simple_.0
jne 0x4f3c7f
push 4
push 0x20
call fcn.0040bee4
add dword [edi + 0x1c], 0x20
mov ebx, eax
inc dword [edi + 0x18]
add esp, 8
mov eax, dword [edi + 0x1c]
cmp eax, dword [edi + 0x20]
jbe 0x4f340e
mov dword [edi + 0x20], eax
mov al, byte [edi + 0x15]
mov byte [ebx + 2], al
mov al, byte [edi + 0x14]
mov byte [ebx + 3], al
mov dword [ebx + 4], 0x20000000
add ebx, 8
mov ecx, dword [ebp - 0x18c]
mov edi, dword [ebp - 0x194]
mov dword [ebx + 0x14], ecx
mov ecx, dword [ebp - 0x198]
mov dword [ebp - 0x18c], ebx
mov byte [ebx + 0xc], 1
mov dword [ebx], ecx
mov dword [ebx + 4], edi
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push 0x37d
push eax
push edi
mov dword [ebx + 8], eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov dword [ebx + 0x10], 1
mov ecx, dword [esi + 0x128]
mov eax, dword [ecx]
cmp eax, vtable.rhea::NullLogger.0
jne 0x4f3c97
jmp 0x4f3a94
push 0x7d0
lea ecx, [ebp - 0x18c]
mov byte [ebp - 0xc4], 1
call fcn.004f3fd0
mov byte [ebp - 0x199], al
lea eax, [ebp - 0xa8]
push eax
mov byte [ebp - 0xc4], 0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push dword [0x51dbec]
mov edx, dword [ebp - 0xa8]
sub edx, dword [0x51dbf0]
push dword [0x51dbe8]
mov ecx, dword [ebp - 0xa4]
sbb ecx, dword [0x51dbf4]
push ecx
push edx
call fcn.004fce10
cmp byte [esi + 0x149], 0
mov edi, edx
mov ebx, eax
mov dword [ebp - 0x1a8], edi
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0xa4], edi
jne 0x4f3568
cmp edi, dword [ebp - 0x1a4]
jb 0x4f39af
ja 0x4f3512
cmp ebx, dword [ebp - 0x1a0]
jb 0x4f39af
mov eax, ebx
add eax, 0x7530
mov dword [ebp - 0x1a0], eax
mov eax, edi
adc eax, 0
cmp dword [esi + 0x150], 0
mov dword [ebp - 0x1a4], eax
je 0x4f3555
push 2
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1f70
push 0
push 0
push 3
push 0x1201
mov ecx, esi
call fcn.004f1a00
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f2450
jmp 0x4f39af
cmp edi, dword [ebp - 0x1a4]
jb 0x4f3657
ja 0x4f3582
cmp ebx, dword [ebp - 0x1a0]
jb 0x4f3657
mov eax, ebx
add eax, 0x7530
mov dword [ebp - 0x1a0], eax
mov eax, edi
adc eax, 0
mov dword [ebp - 0x1a4], eax
mov eax, dword [esi + 0x128]
push str.AlipayChinaCore::priv_sendHeartBeat___n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 4
lea eax, [ebp - 0x20]
push eax
call fcn.004f2330
lea eax, [ebp - 0x20]
push eax
push 0x51395c
lea eax, [esi + 0x22]
push eax
push str._s_s_s
lea eax, [ebp - 0xa0]
push 0x80
push eax
call fcn.004014e0
push 0x513a9c
lea eax, [ebp - 0xa0]
push 0x80
push eax
call fcn.0040bf49
push 0x50d580
lea eax, [ebp - 0xa0]
push 0x80
push eax
call fcn.0040bf49
push 0x513aa0
lea eax, [ebp - 0xa0]
push 0x80
push eax
call fcn.0040bf49
lea ecx, [ebp - 0xa0]
add esp, 0x3c
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4f3628
sub ecx, edx
je 0x4f3657
push 0
movzx eax, cx
push eax
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0x194]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x4f3657
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esi + 0x144]
mov eax, dword [esi + 0x140]
test edx, edx
jne 0x4f366f
test eax, eax
je 0x4f3734
mov ecx, ebx
sub ecx, eax
mov eax, edi
sbb eax, edx
mov dword [ebp - 0x1b0], eax
jne 0x4f368b
cmp ecx, 0xfde8
jbe 0x4f3734
mov ecx, dword [esi + 0x128]
mov eax, ebx
sub eax, dword [esi + 0x140]
push eax
push str.AlipayChinaCore::run_____last_heartbeat_was_rcv_more_than___d__ms_ago__disconnecting_n
mov edx, dword [ecx]
push ecx
call dword [edx + 0xc]
add esp, 0xc
cmp dword [esi + 0x150], 0
je 0x4f36d3
push 2
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1f70
push 0
push 0
push 3
push 0x1201
mov ecx, esi
call fcn.004f1a00
lea eax, [ebp - 0x198]
mov byte [esi + 0x149], 0
push eax
lea ecx, [ebp - 0x18c]
mov byte [ebp - 0x18d], 0
call fcn.004f42e0
mov edi, dword [ebp - 0x194]
cmp edi, 0xffffffff
je 0x4f370f
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x194], 0xffffffff
cmp byte [esi + 0x149], 0
mov ecx, esi
push 0
push 0
je 0x4f3722
push 1
jmp 0x4f3724
push 0
push 0x1200
call fcn.004f1a00
mov edi, dword [ebp - 0x1a8]
mov eax, dword [esi + 0x150]
cmp eax, 1
jne 0x4f37a1
cmp edi, dword [esi + 0x40c]
jb 0x4f39af
ja 0x4f3759
cmp ebx, dword [esi + 0x408]
jb 0x4f39af
mov eax, dword [esi + 0x128]
push str.Order_timed_out_waiting_for_QR_code_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
cmp dword [esi + 0x150], 0
je 0x4f39af
push 2
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1f70
push 0
push 0
push 3
push 0x1201
mov ecx, esi
call fcn.004f1a00
jmp 0x4f39af
cmp eax, 2
jne 0x4f388f
cmp edi, dword [esi + 0x40c]
jb 0x4f3804
ja 0x4f37bc
cmp ebx, dword [esi + 0x408]
jb 0x4f3804
mov eax, dword [esi + 0x128]
push str.Order_timed_out__user_did_not_pay_in_time__order_aborted_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
cmp dword [esi + 0x150], 0
je 0x4f39af
push 2
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1f70
push 0
push 0
push 3
push 0x1201
mov ecx, esi
call fcn.004f1a00
jmp 0x4f39af
cmp edi, dword [esi + 0x414]
jb 0x4f39af
ja 0x4f381e
cmp ebx, dword [esi + 0x410]
jb 0x4f39af
mov eax, dword [esi + 0x128]
push str.polling_for_payment_status_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
lea eax, [ebp - 0xa0]
mov ecx, esi
push 0x80
push eax
lea eax, [esi + 0x1e5]
push eax
push 0x513964
call fcn.004f1ed0
test eax, eax
je 0x4f3879
push 0
movzx eax, ax
push eax
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0x194]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x4f3879
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
add dword [esi + 0x410], 0x7d0
adc dword [esi + 0x414], 0
jmp 0x4f39af
cmp eax, 3
jne 0x4f392c
mov ecx, dword [esi + 0x128]
lea eax, [esi + 0x1e5]
push eax
push str.Order___s__has_been_paid__now_waiting_to_know_when_beverage_has_been_delivered_n
push ecx
mov edx, dword [ecx]
call dword [edx + 0xc]
add esp, 0xc
mov ecx, esi
push 0
push 0
push 2
push 0x1201
call fcn.004f1a00
lea eax, [ebp - 0xb0]
mov dword [esi + 0x150], 4
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push dword [0x51dbec]
mov ecx, dword [ebp - 0xb0]
sub ecx, dword [0x51dbf0]
push dword [0x51dbe8]
mov eax, dword [ebp - 0xac]
sbb eax, dword [0x51dbf4]
push eax
push ecx
call fcn.004fce10
mov dword [ebp - 0xb0], eax
add eax, 0x1d4c0
mov dword [ebp - 0xac], edx
adc edx, 0
mov dword [esi + 0x408], eax
mov dword [esi + 0x40c], edx
jmp 0x4f39af
cmp eax, 4
jne 0x4f395b
cmp edi, dword [esi + 0x40c]
jb 0x4f39af
ja 0x4f3943
cmp ebx, dword [esi + 0x408]
jb 0x4f39af
mov eax, dword [esi + 0x128]
push str.Order_timed_out_while_waiting_for_beverage_ends__order_aborted_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
push 2
jmp 0x4f39a1
cmp eax, 5
jne 0x4f397f
mov ecx, dword [esi + 0x128]
lea eax, [esi + 0x1e5]
push eax
push str.Order___s__finished__SUCCESS_n
push ecx
mov edx, dword [ecx]
call dword [edx + 0xc]
add esp, 0xc
push 0
jmp 0x4f39a1
cmp eax, 6
jne 0x4f39af
mov ecx, dword [esi + 0x128]
lea eax, [esi + 0x1e5]
push eax
push str.Order___s__finished__FAIL_n
push ecx
mov edx, dword [ecx]
call dword [edx + 0xc]
add esp, 0xc
push 1
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1f70
mov al, byte [ebp - 0x199]
test al, al
je 0x4f3a94
movzx eax, al
lea ebx, [ebp - 0x144]
mov dword [ebp - 0x1a8], eax
lea esp, [esp]
mov ecx, dword [ebx]
movzx edx, byte [ecx + 0xc]
mov eax, edx
sub eax, 1
je 0x4f3a19
sub eax, 1
je 0x4f39fc
mov eax, dword [esi + 0x128]
push edx
push str.AlipayChinaCore::run____unknown_event_origin:__d_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 0xc
jmp 0x4f3a84
cmp dword [ecx + 0x10], 2
jne 0x4f3a12
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f1b80
jmp 0x4f3a84
push str.AlipayChinaCore::run____unknown_thread_msg_received_n
jmp 0x4f3a75
cmp dword [ecx + 0x10], 1
jne 0x4f3a70
cmp byte [ebp - 0x18d], 0
je 0x4f3a84
lea eax, [ebp - 0x198]
mov ecx, esi
push eax
call fcn.004f2b00
test al, al
jne 0x4f3a84
mov byte [ebp - 0x18d], al
lea ecx, [ebp - 0x18c]
lea eax, [ebp - 0x198]
push eax
call fcn.004f42e0
mov edi, dword [ebp - 0x194]
cmp edi, 0xffffffff
je 0x4f3a84
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x194], 0xffffffff
jmp 0x4f3a84
push str.AlipayChinaCore::run____unknown_socket_msg_received_n
mov eax, dword [esi + 0x128]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
add ebx, 4
sub dword [ebp - 0x1a8], 1
jne 0x4f39d0
cmp byte [esi + 0x148], 0
mov ebx, 2
je 0x4f31f0
mov eax, dword [esi + 0x128]
push str.AlipayChinaCore::die_n
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
add esp, 8
lea eax, [ebp - 0x1ac]
lea ecx, [ebp - 0x18c]
push eax
call fcn.004f4480
lea eax, [ebp - 0x198]
push eax
lea ecx, [ebp - 0x18c]
call fcn.004f42e0
cmp byte [ebp - 0x18d], 0
je 0x4f3af9
mov edi, dword [ebp - 0x194]
cmp edi, 0xffffffff
je 0x4f3af9
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esi + 0x130]
call fcn.0042dce0
mov edi, dword [esi + 0x124]
mov ecx, dword [esi + 0x134]
mov eax, dword [edi]
cmp eax, vtable.rhea::AllocatorSimple_class_rhea::AllocatorTrackingPolicy_simple_.0
jne 0x4f3c9f
movzx eax, byte [ecx - 3]
lea edx, [ecx - 8]
movzx ecx, byte [edx + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 7]
shl ecx, 0x10
or ecx, eax
movzx eax, byte [edx + 6]
dec dword [edi + 0x18]
and ecx, 0x3fffffff
shl eax, 8
or ecx, eax
sub dword [edi + 0x1c], ecx
push edx
call fcn.0040beca
add esp, 4
cmp byte [esi + 0x424], 0
je 0x4f3bad
mov edi, dword [esi + 0x418]
mov ecx, dword [esi + 0x41c]
mov eax, dword [edi]
cmp eax, vtable.rhea::AllocatorSimple_class_rhea::AllocatorTrackingPolicy_simple_.0
jne 0x4f3cac
movzx eax, byte [ecx - 3]
lea edx, [ecx - 8]
movzx ecx, byte [edx + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 7]
shl ecx, 0x10
or ecx, eax
movzx eax, byte [edx + 6]
dec dword [edi + 0x18]
and ecx, 0x3fffffff
shl eax, 8
or ecx, eax
sub dword [edi + 0x1c], ecx
push edx
call fcn.0040beca
add esp, 4
mov edi, dword [0x51dd94]
mov dword [esi + 0x41c], 0
mov dword [esi + 0x420], 0
mov byte [esi + 0x424], 0
mov dword [esi + 0x418], 0
mov dword [esi + 0x42c], 0
mov dword [esi + 0x428], 0
mov ecx, dword [esi + 0x124]
test ecx, ecx
je 0x4f3c50
mov eax, dword [ecx]
push 0
call dword [eax]
mov eax, dword [edi]
mov ecx, dword [esi + 0x124]
cmp eax, vtable.rhea::AllocatorSimple_class_rhea::AllocatorTrackingPolicy_simple_.0
jne 0x4f3cb9
movzx eax, byte [ecx - 3]
lea edx, [ecx - 8]
movzx ecx, byte [edx + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 7]
shl ecx, 0x10
or ecx, eax
movzx eax, byte [edx + 6]
dec dword [edi + 0x18]
and ecx, 0x3fffffff
shl eax, 8
or ecx, eax
sub dword [edi + 0x1c], ecx
push edx
call fcn.0040beca
add esp, 4
mov dword [esi + 0x124], 0
lea ecx, [ebp - 0x18c]
call fcn.004f4600
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403d8c
mov esp, ebp
pop ebp
ret
call dword [eax + 4]
jmp 0x4f3225
push 0
push 0
push 0x503d60
push 4
push 0x18
mov ecx, edi
call edx
mov ebx, eax
jmp 0x4f3424
call dword [eax + 8]
jmp 0x4f3a94
push 0
push ecx
mov ecx, edi
call dword [eax + 0x10]
jmp 0x4f3b54
push 0
push ecx
mov ecx, edi
call dword [eax + 0x10]
jmp 0x4f3bad
push 1
push ecx
mov ecx, edi
call dword [eax + 0x10]
jmp 0x4f3c46