Function at 0x52b270
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x581b63
mov eax, dword fs:[0]
push eax
sub esp, 0xecc
mov eax, dword [0x5e95e0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0xcb8], ecx
xor ecx, ecx
mov dword [ebp - 0xc88], ecx
mov dword [ebp - 0xc74], eax
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0xc78], eax
mov eax, dword [eax + 0x890]
mov edx, dword [eax + 0x30]
mov dword [ebp - 0xcc8], 0x3fc
mov dword [ebp - 0xc64], eax
mov dword [ebp - 0xc7c], edx
mov dword [ebp - 0xcac], ecx
mov dword [ebp - 0xc68], ecx
mov dword [ebp - 0xc90], ecx
mov dword [ebp - 0xc8c], ecx
mov dword [ebp - 0xcb0], 0xffffffff
mov dword [ebp - 0xca8], ecx
mov dword [ebp - 0xc9c], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [ebp - 0xc78]
mov dword [ebp - 0xcb4], eax
mov ebx, dword [ebp - 0xc64]
mov eax, dword [ebp - 0xc74]
cmp dword [eax + 0x30], 0
je 0x52b341
mov dword [ebp - 0xc68], 0xa
jmp 0x52b537
cmp dword [ebx + 0x78], 0
je 0x52b356
mov dword [ebp - 0xc68], 0
jmp 0x52b537
mov ecx, dword [ebp - 0xc74]
mov eax, dword [ebp + 0xc]
add ecx, 0x50
push ecx
lea edx, [ebp - 0xed8]
push edx
mov dword [ebp - 0xdcc], eax
mov dword [ebp - 0xed4], eax
push 0
lea eax, [ebp - 0xdd0]
push eax
mov esi, 1
push 0
mov dword [ebp - 0xdd0], esi
mov dword [ebp - 0xed8], esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x52b52d
test eax, eax
jne 0x52b494
cmp dword [ebx + 0x4c], eax
jle 0x52b3ce
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebx + 0x84]
cmp eax, dword [ebx + 0x4c]
jb 0x52b3ce
mov dword [ebp - 0xc68], 5
jmp 0x52b537
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [edi + 0x34]
sub eax, dword [ebp - 0xcb4]
imul ecx, ecx, 0x3e8
cmp eax, ecx
jb 0x52b3fc
cmp dword [edi + 0x68], 0
jne 0x52b3fc
mov dword [ebp - 0xc68], 5
jmp 0x52b537
cmp dword [edi + 0x1c], esi
jne 0x52b426
cmp dword [edi + 0x884], 0xa
jge 0x52b426
cmp dword [edi + 0x20], 0
jle 0x52b426
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [edi + 0x20]
cmp eax, 0x1388
jb 0x52b426
cmp dword [ebx + 0x74], 0
jg 0x52b465
cmp dword [edi + 0x1c], 2
jne 0x52b326
cmp dword [edi + 0x884], 0xa
jge 0x52b326
cmp dword [edi + 0x20], 0
jle 0x52b326
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [edi + 0x20]
cmp eax, 0x1388
jb 0x52b326
cmp dword [ebx + 0x74], 0
jle 0x52b326
lea eax, [ebx + 0xc4]
call fcn.0052ae70
cmp eax, 0x4e20
jge 0x52b326
mov ebx, dword [ebp - 0xc7c]
mov esi, edi
mov dword [edi + 0x18], 0xa
call fcn.0052c5c0
jmp 0x52b320
mov esi, dword [ebp + 0xc]
lea edx, [ebp - 0xed8]
push edx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x52b52d
lea eax, [ebp - 0xdd0]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x52b326
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [edi + 0x20], 0
mov dword [ebp - 0xcb4], eax
jne 0x52b4d6
mov dword [edi + 0x20], eax
push 0x5a0
lea ecx, [ebp - 0x6c0]
push 0
push ecx
call fcn.00557890
add esp, 0xc
push 0
push 0x5a0
lea edx, [ebp - 0x6c0]
push edx
mov eax, esi
push eax
call dword [sym.imp.WS2_32.dll_recv]
add dword [ebp - 0xc9c], 1
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0xc84], ebx
jne 0x52b522
mov dword [ebp - 0xc68], 4
jmp 0x52b537
cmp ebx, 0xffffffff
jne 0x52b55e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xc68], 2
cmp dword [ebp - 0xc90], 0x197
jne 0x52b829
cmp dword [ebp - 0xc68], 4
jne 0x52b829
mov eax, 6
jmp 0x52b846
test ebx, ebx
jle 0x52b320
cmp dword [ebp - 0xcac], 0
lea ecx, [ebp - 0x6c0]
mov dword [ebp - 0xc94], ecx
mov dword [ebp - 0xc98], ebx
jne 0x52bd1d
mov dword [ebp - 0xcac], 1
mov dword [ebp - 0xc80], 0xffffffff
call fcn.00530e1f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x52b5b3
push 0x80004005
call fcn.00401f70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xc6c], eax
mov dword [ebp - 4], 0
call fcn.00530e1f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x52b5e6
push 0x80004005
call fcn.00401f70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0xc70], eax
mov esi, dword [ebp - 0xc74]
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0xca4], eax
mov dword [ebp - 0xca0], eax
lea eax, [esi + 0x4c]
push eax
lea ecx, [ebp - 0xc70]
push ecx
lea edx, [ebp - 0xca4]
push edx
mov dword [ebp - 0xcc0], eax
lea eax, [ebp - 0xc90]
push eax
lea ecx, [ebp - 0xc80]
push ecx
lea edx, [ebp - 0xcc4]
push edx
push ebx
lea edx, [ebp - 0xc6c]
lea ecx, [ebp - 0x6c0]
call fcn.0052db00
add esp, 0x1c
cmp eax, 1
jne 0x52bdb0
mov ecx, dword [ebp - 0xcc4]
lea eax, [ebp + ecx - 0x6c0]
mov dword [ebp - 0xc94], eax
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0xc98], eax
mov eax, dword [ebp - 0xc90]
lea edx, [eax - 0x12d]
cmp edx, 1
ja 0x52b708
lea eax, [ebp - 0xc70]
lea ecx, [edi + 0x5c]
push eax
call fcn.00402310
mov ecx, dword [ebp - 0xc7c]
push ecx
mov esi, edi
call fcn.005211f0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
mov dword [ebp - 0xc68], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x52b6d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
cmp eax, 0xc8
je 0x52b798
cmp eax, 0xce
je 0x52b862
cmp eax, 0x197
je 0x52bcb0
add eax, 0xfffffe70
mov ecx, 0x63
cmp ecx, eax
sbb eax, eax
add eax, 9
mov dword [ebp - 0xc68], eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x52b766
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
mov ecx, dword [esi + 0x40]
add ecx, dword [esi + 0x44]
jne 0x52b7b0
mov edx, dword [ebp - 0xc64]
cmp dword [edx + 0x6c], 0xffffffff
je 0x52b86d
mov dword [edi + 0x68], 1
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
add eax, ecx
je 0x52b86d
mov esi, dword [ebp - 0xc64]
call fcn.005294a0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
mov dword [ebp - 0xc68], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x52b800
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b829
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0xc74]
mov eax, dword [ebp - 0xc68]
mov dword [ecx + 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00552101
mov esp, ebp
pop ebp
ret
cmp eax, 0x197
je 0x52bcb0
mov edi, dword [ebp - 0xc64]
mov ecx, dword [edi + 0x60]
add edi, 0x60
cmp dword [ecx - 0xc], 0
jne 0x52b988
mov edx, dword [ebp - 0xc6c]
cmp dword [edx - 0xc], 0
je 0x52b988
push 0x22
lea eax, [ebp - 0xc6c]
push eax
call fcn.00506a20
mov esi, dword [ebp - 0xc6c]
mov edx, dword [esi - 0xc]
xor ebx, ebx
xor eax, eax
test edx, edx
jle 0x52b90f
test eax, eax
jl 0x52b905
cmp eax, edx
jg 0x52b905
movzx ecx, word [esi + eax*2]
cmp cx, 0x25
jne 0x52b8c7
add ebx, 1
add eax, 1
cmp eax, edx
jl 0x52b8b2
cmp ebx, 2
jl 0x52b90f
push esi
lea ecx, [ebp - 0xcbc]
call fcn.00426b80
mov byte [ebp - 4], 2
mov eax, dword [eax]
or dword [ebp - 0xc88], 1
lea ecx, [ebp - 0x120]
push ecx
mov ecx, eax
call fcn.0052f130
add esp, 4
test al, al
je 0x52b90f
mov bl, 1
jmp 0x52b911
push 0x80070057
call fcn.00401f70
xor bl, bl
mov dword [ebp - 4], 1
test byte [ebp - 0xc88], 1
je 0x52b94a
mov eax, dword [ebp - 0xcbc]
and dword [ebp - 0xc88], 0xfffffffe
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x52b94a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x52b97a
lea eax, [ebp - 0x120]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x52b957
push edi
sub eax, edx
push eax
lea ecx, [ebp - 0x120]
push ecx
push 0x3a8
call fcn.0052f310
add esp, 0x10
jmp 0x52b988
lea edx, [ebp - 0xc6c]
push edx
mov ecx, edi
call fcn.00402310
mov ebx, dword [ebp - 0xc80]
test ebx, ebx
jl 0x52bb09
mov edi, dword [ebp - 0xc74]
mov esi, dword [ebp - 0xc64]
mov ecx, ebx
call fcn.00529c30
cmp eax, 3
jne 0x52ba0c
mov dword [ebp - 0xc68], eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b9da
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
cmp eax, 1
jne 0x52ba73
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
mov dword [ebp - 0xc68], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52ba41
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
test eax, eax
jne 0x52ba90
mov edx, dword [ebp - 0xc7c]
mov eax, dword [edx + 0x64]
push ebx
mov ecx, esi
push ecx
push 0x4cc
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov edi, esi
mov esi, dword [ebp - 0xca0]
test esi, esi
jl 0x52bb8a
mov edx, dword [ebp - 0xca4]
jg 0x52bab0
test edx, edx
jbe 0x52bb8a
mov ecx, dword [edi + 0x94]
test ecx, ecx
mov eax, dword [edi + 0x90]
jl 0x52bb7e
jg 0x52bace
test eax, eax
jbe 0x52bb7e
cmp dword [edi + 0x50], 0
je 0x52bb8a
cmp eax, edx
jne 0x52bae4
cmp ecx, esi
je 0x52bb8a
lea ecx, [ebp - 0xc70]
mov dword [ebp - 0xc68], 3
call fcn.004a4690
lea ecx, [ebp - 0xc6c]
call fcn.004a4690
jmp 0x52b537
mov ecx, dword [ebp - 0xc64]
cmp dword [ecx + 0x74], 0
jl 0x52bb77
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
mov dword [ebp - 0xc68], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x52bb45
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
mov edi, ecx
jmp 0x52ba92
mov dword [edi + 0x90], edx
mov dword [edi + 0x94], esi
lea ecx, [ebp - 0xc80]
push ecx
push edi
mov dword [ebp - 0xc80], 0
call fcn.00528b40
test eax, eax
jne 0x52bbfc
mov byte [ebp - 4], al
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x52bbca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
mov ecx, dword [ebp - 0xcc0]
cmp dword [ecx], 0
jne 0x52bc30
test ebx, ebx
jle 0x52bc30
mov eax, dword [ebp - 0xc78]
mov ecx, 1
cmp dword [eax + 0x18], ecx
jle 0x52bc30
cmp dword [eax + 0x884], ecx
jne 0x52bc30
mov ebx, dword [ebp - 0xc7c]
mov esi, eax
call fcn.0052c5c0
cmp dword [ebp - 0xc80], 0
je 0x52bcc2
mov edx, dword [ebp - 0xc7c]
mov eax, dword [edx]
cmp dword [eax + 0x54], edi
jne 0x52bc58
mov eax, dword [eax + 0x20]
push 1
push 0
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52bc7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
mov eax, dword [ebp - 0xc80]
test eax, eax
jl 0x52bcc2
add ecx, eax
mov dword [ebp - 0xcb0], ecx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52bce8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52bd11
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0xc78]
mov ebx, dword [ebp - 0xc84]
cmp dword [ebp - 0xc90], 0x197
je 0x52bf3e
mov ecx, dword [ebp - 0xc64]
mov edx, dword [ecx + 0x160]
cmp edx, dword [0x58c4f4]
je 0x52becc
mov esi, ecx
mov eax, dword [esi + 0x30]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0xc74]
mov dword [ebp - 4], 3
mov eax, dword [ecx + 0x44]
add eax, dword [ecx + 0x40]
mov edi, dword [esi + 0x15c]
cdq
push 0
add esi, 0x15c
push edx
mov edx, dword [edi + 0x28]
push eax
mov ecx, esi
call edx
mov edi, dword [ebp - 0xc98]
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push edi
lea ecx, [ebp - 0xc60]
push ecx
mov ecx, esi
call edx
call fcn.00530e1f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x52be12
push 0x80004005
call fcn.00401f70
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc70]
add eax, 0xfffffff0
mov dword [ebp - 0xc68], 9
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52bde0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52b537
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x52b537
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [ebp - 0xc84], ebx
mov byte [ebp - 4], 4
xor esi, esi
lea ebx, [ebx]
cmp esi, edi
jge 0x52be92
mov ecx, dword [ebp - 0xc94]
mov al, byte [ebp + esi - 0xc60]
mov cl, byte [esi + ecx]
cmp al, cl
je 0x52be8d
mov edx, dword [ebp - 0xc78]
mov edx, dword [edx]
push edx
movzx ecx, cl
push esi
push ecx
movzx edx, al
mov eax, dword [ebp - 0xc74]
mov ecx, dword [eax + 0x44]
add ecx, dword [eax + 0x40]
push edx
add ecx, esi
push ecx
lea edx, [ebp - 0xc84]
push 0x5c6c48
push edx
call fcn.00405480
mov ebx, dword [ebp - 0xc84]
add esp, 0x1c
push 0
push 0
push ebx
call fcn.00539414
add esi, 1
jmp 0x52be30
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x52beb2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc64]
mov edx, dword [ecx + 0x30]
add edx, 0x20
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0xc98]
mov eax, dword [ebp - 0xc94]
mov edi, dword [ebp - 0xc64]
push esi
push eax
mov eax, dword [ebp - 0xc74]
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x40]
push ecx
push edx
push eax
call fcn.00529540
mov ecx, dword [ebp - 0xc74]
add dword [ecx + 0x44], esi
mov edx, edi
mov dword [ecx + 0x48], eax
mov ecx, dword [edx + 0x6c]
test ecx, ecx
jle 0x52bf15
sub ecx, dword [edx + 0x68]
cmp dword [edx + 0x7c], ecx
jge 0x52b537
test eax, eax
jne 0x52b537
mov edi, dword [ebp - 0xc78]
mov ebx, edx
jmp 0x52b326
mov eax, dword [ebp - 0xcc8]
sub eax, dword [ebp - 0xc8c]
mov esi, ebx
cmp ebx, eax
jle 0x52bf52
mov esi, eax
test esi, esi
jle 0x52bf7b
mov edx, dword [ebp - 0xc8c]
mov ecx, dword [ebp - 0xcb8]
push esi
lea eax, [ebp - 0x6c0]
push eax
add ecx, edx
push ecx
call fcn.0055cb00
add esp, 0xc
add dword [ebp - 0xc8c], esi
mov eax, dword [ebp - 0xca8]
add eax, ebx
cmp eax, dword [ebp - 0xcb0]
mov dword [ebp - 0xca8], eax
jl 0x52b320
mov eax, 6
jmp 0x52b846