Function at 0x502ab0
Capabilities:
Access peb ldr_data
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5fc418
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov ebp, ecx
mov eax, dword [0x677600]
mov edx, dword [eax + 0xc]
mov ecx, 0x677600
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
xor ebx, ebx
mov dword [esp + 0x30], ebx
mov eax, dword [ebp + 0x80]
push eax
push 0x636d9c
lea edi, [esp + 0x20]
call fcn.004ce3a0
mov esi, dword [esp + 0x20]
mov eax, dword [esi - 0xc]
add esp, 8
cmp eax, ebx
jl 0x502b3b
push str.wbf_ap_17164
push esi
call fcn.005d7c48
add esp, 8
cmp eax, ebx
je 0x502b3b
sub eax, esi
cmp eax, 0xffffffff
jne 0x502c5f
cmp dword [esi - 0xc], ebx
jl 0x502b5d
push str.wbf_ap_17165
push esi
call fcn.005d7c48
add esp, 8
cmp eax, ebx
je 0x502b5d
sub eax, esi
cmp eax, 0xffffffff
jne 0x502c5f
push str.CAsyncTcpClient::OnWrite
push str.Enter__s
call fcn.00501f90
mov eax, dword [ebp + 0x48]
add esp, 8
cmp eax, ebx
jne 0x502b85
mov edx, dword [ebp]
mov eax, dword [edx + 0x2c]
mov ecx, ebp
call eax
jmp 0x502d51
mov ebx, dword [sym.imp.WS2_32.dll_send]
jmp 0x502b90
mov ecx, dword [ebp + 0x40]
push 0
push eax
push ecx
mov ecx, dword [ebp + 0x6c]
push ecx
call ebx
mov edi, eax
push edi
push str.CAsyncTcpClient::OnWrite
push str._s_send_iBytes___d
call fcn.00501f90
add esp, 0xc
test edi, edi
jle 0x502be6
mov eax, dword [ebp + 0x48]
cmp eax, edi
jbe 0x502bd0
mov ecx, dword [ebp + 0x40]
sub eax, edi
push eax
lea edx, [ecx + edi]
push edx
push ecx
call fcn.005d7d30
add esp, 0xc
mov eax, dword [ebp + 0x48]
cmp eax, edi
jb 0x502bfc
sub eax, edi
push 0
push eax
lea esi, [ebp + 0x3c]
call fcn.0046bad0
jmp 0x502bfc
jge 0x502bfc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x502c25
mov byte [ebp + 0x76], 1
test edi, edi
jle 0x502c07
mov eax, dword [ebp + 0x48]
test eax, eax
ja 0x502b90
mov eax, dword [ebp + 0x68]
mov ecx, dword [ebp + 0x6c]
push 0x23
push 0x81da
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov esi, dword [esp + 0x18]
jmp 0x502d47
test esi, esi
jne 0x502c2c
or esi, 0xffffffff
push esi
push edi
push str.CAsyncTcpClient::OnWrite
push str._s_send_iBytes___d_iErrCode___d
call fcn.00501f90
add esp, 0x10
lea eax, [esp + 0x18]
call fcn.004152a0
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push str.CAsyncTcpClient::OnWrite
push str.Enter__s
call fcn.00501f90
add esp, 8
cmp dword [ebp + 0x48], ebx
jne 0x502c85
mov edx, dword [ebp]
mov eax, dword [edx + 0x2c]
mov ecx, ebp
call eax
jmp 0x502d51
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov ebx, dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x40]
push 0
push eax
push ecx
mov ecx, dword [ebp + 0x6c]
push ecx
call ebx
mov edi, eax
push edi
push str.CAsyncTcpClient::OnWrite
push str._s_send_iBytes___d
call fcn.00501f90
add esp, 0xc
test edi, edi
jle 0x502cec
mov eax, dword [ebp + 0x48]
cmp eax, edi
jbe 0x502cd6
mov ecx, dword [ebp + 0x40]
sub eax, edi
push eax
lea edx, [ecx + edi]
push edx
push ecx
call fcn.005d7d30
add esp, 0xc
mov eax, dword [ebp + 0x48]
cmp eax, edi
jb 0x502d13
sub eax, edi
push 0
push eax
lea esi, [ebp + 0x3c]
call fcn.0046bad0
jmp 0x502d13
jge 0x502d1b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x502d8b
mov eax, 1
add dword [esp + 0x1c], eax
mov byte [ebp + 0x76], 1
mov dword [esp + 0x20], eax
test edi, edi
mov esi, dword [esp + 0x18]
jl 0x502d20
cmp edi, dword [ebp + 0x48]
je 0x502d32
cmp dword [esp + 0x20], 0
je 0x502d32
cmp dword [esp + 0x1c], 5
jl 0x502c93
mov ecx, dword [ebp + 0x68]
mov edx, dword [ebp + 0x6c]
push 0x21
push 0x81da
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov eax, dword [ebp]
mov edx, dword [eax + 0x24]
mov ecx, ebp
call edx
lea eax, [esi - 0x10]
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x502d75
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x502d92
or esi, 0xffffffff
push esi
push edi
push str.CAsyncTcpClient::OnWrite
push str._s_send_iBytes___d_iErrCode___d
call fcn.00501f90
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x502dce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret