Function at 0x4ae2c0
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x270
mov eax, dword [edx + 0x84]
mov ebx, edx
mov dword [esp + 0x94], ecx
push dword [edx + 0x80]
call dword [eax + 0x5c]
add esp, 4
test eax, eax
je 0x4ae343
mov esi, eax
mov eax, dword [eax]
lea edi, [esp + 0x100]
mov dword [esp + 0x100], 0
push 4
push edi
push 0x1006
push 0xffff
push eax
call dword [sym.imp.ws2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4ae358
mov eax, dword [esi]
mov dword [esp + 0x100], 0
push 4
push edi
push 0x1005
push 0xffff
push eax
call dword [sym.imp.ws2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x4ae358
xor eax, eax
mov dword [esp + 4], ebx
cmp eax, dword [ebx + 4]
jno 0x4ae37a
mov esi, 0x80000000
jmp 0x4ae55b
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x94]
mov dword [ecx + 4], eax
mov dword [ecx], 0
mov ecx, ebx
call fcn.004a2ea0
jmp 0x4ae646
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x4ae38b
lock inc dword [eax + 4]
jle 0x4aeb3c
mov esi, dword [ebx + 0xc]
mov dword [esp + 0xc], eax
test esi, esi
js 0x4aeb3c
mov edi, dword [ebx + 8]
je 0x4ae3b8
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, esi
call fcn.00490be0
test eax, eax
jne 0x4ae3bd
jmp 0x4aeb3c
mov eax, 1
push esi
push edi
mov dword [esp + 0x34], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [ebx + 0x18]
test edx, edx
js 0x4aeb3c
mov edi, dword [ebx + 0x14]
je 0x4ae3f8
movzx eax, byte [0x77618d]
xor ecx, ecx
mov ebx, edx
call fcn.00490be0
test eax, eax
je 0x4aeb3c
mov edx, ebx
jmp 0x4ae3fd
mov eax, 1
mov dword [esp + 0x10], edx
push edx
push edi
mov dword [esp + 0x10], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 4]
movzx eax, word [ecx + 0x4a]
movzx edx, word [ecx + 0x48]
mov word [esp + 0x28], ax
xor eax, eax
mov word [esp + 0x18], dx
cmp eax, dword [ecx + 0x1c]
jno 0x4ae437
mov edi, 0x80000000
jmp 0x4ae55b
mov eax, dword [ecx + 0x24]
test eax, eax
js 0x4aeb3c
mov ecx, dword [esp + 4]
mov ebx, eax
mov edi, dword [ecx + 0x20]
je 0x4ae466
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, ebx
call fcn.00490be0
test eax, eax
jne 0x4ae46b
jmp 0x4aeb3c
mov eax, 1
push ebx
push edi
mov dword [esp + 0x24], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 4]
xor edx, edx
mov ecx, dword [eax + 0x40]
cmp edx, dword [eax + 0x28]
mov dword [esp + 0x14], ecx
jno 0x4ae4aa
mov dword [esp + 0x24], 0x80000000
mov eax, dword [esp + 4]
cmp edx, dword [eax + 0x34]
jno 0x4ae503
mov dword [esp + 0x20], 0x80000000
jmp 0x4ae551
mov edi, dword [eax + 0x30]
test edi, edi
js 0x4aeb3c
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x2c]
je 0x4ae4e0
mov dword [esp + 0x24], ecx
xor ecx, ecx
mov edx, edi
movzx eax, byte [0x77618d]
call fcn.00490be0
test eax, eax
je 0x4aeb3c
mov ecx, dword [esp + 0x24]
jmp 0x4ae4e5
mov eax, 1
mov dword [esp + 0x24], edi
push edi
push ecx
mov dword [esp + 0x40], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor edx, edx
mov eax, dword [esp + 4]
cmp edx, dword [eax + 0x34]
jo 0x4ae49d
mov edi, dword [eax + 0x3c]
test edi, edi
js 0x4aeb3c
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x38]
je 0x4ae539
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov edx, edi
movzx eax, byte [0x77618d]
call fcn.00490be0
test eax, eax
je 0x4aeb3c
mov ecx, dword [esp + 0x20]
jmp 0x4ae53e
mov eax, 1
mov dword [esp + 0x20], edi
push edi
push ecx
mov dword [esp + 0x3c], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 4]
mov edi, ebx
movzx eax, byte [eax + 0x44]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 8]
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], ebx
neg esi
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], edi
mov dword [esp + 0x6c], edi
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 4]
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x74], edi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x80], edi
lea edi, [esp + 0x4c]
mov dword [esp + 0x88], ecx
mov byte [esp + 0x8c], al
movzx eax, word [esp + 0x18]
mov word [esp + 0x90], ax
movzx eax, word [esp + 0x28]
mov word [esp + 0x92], ax
seto ah
cmp edx, 0xffffffff
sete cl
or cl, ah
je 0x4ae64e
mov ecx, ebx
call fcn.004a2ea0
xor eax, eax
cmp eax, dword [esp + 0x4c]
jo 0x4ae63c
mov eax, dword [esp + 0x48]
cmp eax, 0xffffffff
je 0x4ae635
lock dec dword [eax + 4]
jne 0x4ae635
push eax
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, edi
call fcn.004a2e00
mov eax, dword [esp + 0x94]
mov byte [eax], 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [edx]
test eax, eax
je 0x4ae608
js 0x4aeb3c
lea ecx, [eax + 1]
lock cmpxchg dword [edx], ecx
jne 0x4ae650
mov dword [esp + 0x98], edx
cmp dword [edx + 0x48], 0
je 0x4ae6b6
cmp dword [edx + 0x4c], 0
je 0x4ae6b6
add edx, 0x10
mov cl, 1
xor eax, eax
mov dword [esp + 0x2c], edx
lock cmpxchg byte [edx], cl
jne 0x4af356
mov edi, dword [esp + 0x54]
test edi, edi
js 0x4aeb3c
mov esi, dword [esp + 0x50]
je 0x4ae6de
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, edi
call fcn.00490be0
test eax, eax
jne 0x4ae6e3
jmp 0x4aeb3c
mov ecx, ebx
call fcn.004a2ea0
mov eax, dword [esp + 0x98]
lock dec dword [eax]
jne 0x4ae60f
lea ecx, [esp + 0x98]
call fcn.004a5a50
jmp 0x4ae60f
mov eax, 1
mov dword [esp + 8], edi
push edi
push esi
mov dword [esp + 0x18], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edi, dword [esp + 0x60]
test edi, edi
js 0x4aeb3c
mov esi, dword [esp + 0x5c]
je 0x4ae721
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, edi
call fcn.00490be0
test eax, eax
jne 0x4ae726
jmp 0x4aeb3c
mov eax, 1
push edi
push esi
mov dword [esp + 0x20], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, word [esp + 0x90]
mov word [esp + 0x28], ax
movzx eax, word [esp + 0x92]
mov word [esp + 0x1c], ax
xor eax, eax
cmp eax, dword [esp + 0x64]
jno 0x4ae761
mov esi, 0x80000000
jmp 0x4ae85b
mov esi, dword [esp + 0x6c]
test esi, esi
js 0x4aeb3c
mov ecx, dword [esp + 0x68]
je 0x4ae795
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov edx, esi
movzx eax, byte [0x77618d]
call fcn.00490be0
test eax, eax
je 0x4aeb3c
mov ecx, dword [esp + 0x14]
jmp 0x4ae79a
mov eax, 1
push esi
push ecx
mov dword [esp + 0x2c], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor edx, edx
mov eax, dword [esp + 0x88]
cmp edx, dword [esp + 0x70]
mov dword [esp + 0x20], eax
jno 0x4ae7cb
mov dword [esp + 0x14], 0x80000000
mov ecx, 0x80000000
jmp 0x4ae805
mov edx, dword [esp + 0x74]
lea ecx, [esp + 0x100]
mov dword [esp + 0x14], 0x80000000
push dword [esp + 0x78]
call fcn.00412690
add esp, 4
mov edx, dword [esp + 0x108]
mov ecx, dword [esp + 0x100]
mov eax, dword [esp + 0x104]
mov dword [esp + 0x3c], edx
xor edx, edx
cmp edx, dword [esp + 0x7c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
jno 0x4ae815
jmp 0x4ae853
mov edx, dword [esp + 0x80]
lea ecx, [esp + 0x100]
push dword [esp + 0x84]
call fcn.00412690
add esp, 4
mov eax, dword [esp + 0x100]
mov edx, dword [esp + 0x104]
mov ecx, dword [esp + 0x108]
mov dword [esp + 0x14], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], ecx
movzx edx, byte [esp + 0x8c]
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], ecx
mov dword [esp + 0xb0], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0xb4], edi
lea ecx, [esp + 0x100]
mov dword [esp + 0xb8], eax
movzx eax, word [esp + 0x28]
mov dword [esp + 0xbc], edi
mov word [esp + 0xec], ax
movzx eax, word [esp + 0x1c]
mov word [esp + 0xee], ax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc0], esi
mov dword [esp + 0xc8], esi
mov dword [esp + 0xc4], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xd0], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0xdc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xe0], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0xe4], eax
mov eax, dword [esp + 0xc]
mov byte [esp + 0xe8], dl
lea edx, [eax + 0x28]
lea eax, [esp + 0xa8]
mov dword [esp + 0x24], edx
push eax
call fcn.004b6860
add esp, 4
mov edx, dword [esp + 0x100]
lea esi, [esp + 0x104]
lea edi, [esp + 0x228]
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x148]
mov eax, edx
neg eax
mov eax, dword [esp + 0x150]
jno 0x4aeb3e
mov dword [esp + 8], esi
lea edi, [esp + 0xa8]
lea esi, [esp + 0x228]
mov ecx, 0x11
mov edx, dword [esp + 0x14c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 8]
mov dword [esp + 0xf0], edx
mov dword [esp + 8], edx
mov dword [esp + 0xec], ecx
mov dword [esp + 0xf4], eax
mov eax, dword [edx - 0x10]
mov edi, dword [edx - 4]
cmp edi, eax
jne 0x4ae9c9
mov esi, dword [esp + 8]
mov ecx, esi
add ecx, 0xfffffff0
call fcn.004b69d0
mov eax, dword [esi - 0x10]
mov edi, dword [esi - 4]
mov esi, dword [esp + 8]
xor edx, edx
mov ecx, dword [esi - 8]
add ecx, edi
cmp ecx, eax
cmovb eax, edx
sub ecx, eax
mov eax, ecx
shl eax, 7
lea eax, [eax + ecx*8]
add eax, dword [esi - 0xc]
push 0x88
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [edi + 1]
mov dword [esp + 4], edi
xor edi, edi
mov dword [esi - 4], eax
mov esi, dword [esp + 0xc]
cmp eax, dword [esi + 0x4c]
jbe 0x4aed43
mov ebx, dword [esp + 8]
mov eax, dword [ebx - 8]
mov edx, dword [ebx - 0x10]
mov esi, dword [ebx - 0xc]
lea ecx, [eax + 1]
cmp ecx, edx
cmovb edx, edi
neg edx
lea ecx, [eax + edx + 1]
mov dword [ebx - 8], ecx
mov ecx, dword [esp + 4]
mov dword [ebx - 4], ecx
mov ecx, eax
shl ecx, 7
lea ecx, [ecx + eax*8]
mov eax, dword [esi + ecx + 4]
cmp eax, 0x80000001
je 0x4aeb3c
add esi, ecx
lea edi, [esp + 0x108]
mov ecx, dword [esi]
add esi, 8
mov dword [esp + 0x100], ecx
mov dword [esp + 0x104], eax
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x24]
test eax, eax
mov dword [esp + 4], eax
je 0x4aeb3c
mov edx, dword [esp + 0xc]
xor ebx, ebx
mov esi, dword [edx + 0x18]
mov eax, dword [edx + 0x20]
mov edx, dword [edx + 0x1c]
cmp eax, esi
mov ecx, esi
mov dword [esp + 0x10], eax
mov edi, esi
mov dword [esp + 0x28], esi
mov dword [esp + 8], edx
cmovb ecx, ebx
sub eax, ecx
mov ecx, dword [esp + 4]
sub edi, eax
mov dword [esp + 0x18], edi
cmp edi, ecx
lea ecx, [eax + ecx]
cmovb ecx, esi
cmp eax, ecx
je 0x4aeaf7
mov ecx, dword [esp + 8]
lea eax, [eax + eax*8]
lea esi, [ecx + eax*8]
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x18]
cmp ecx, eax
cmovb eax, ecx
xor ebx, ebx
shl eax, 3
lea edi, [eax + eax*8]
mov ecx, esi
lea edx, [esp + 0x4c]
call fcn.004b6a70
test al, al
jne 0x4aec3b
add esi, 0x48
inc ebx
add edi, 0xffffffb8
jne 0x4aeadb
mov edx, dword [esp + 0x18]
cmp edx, dword [esp + 4]
jae 0x4aeb3c
mov ecx, dword [esp + 4]
mov esi, dword [esp + 8]
cmp ecx, edx
lea eax, [ecx*8]
cmovb edx, ecx
lea edi, [eax + eax*8]
shl edx, 3
lea eax, [edx + edx*8]
sub edi, eax
mov ecx, esi
lea edx, [esp + 0x4c]
call fcn.004b6a70
test al, al
jne 0x4aec3b
add esi, 0x48
inc ebx
add edi, 0xffffffb8
jne 0x4aeb20
ud2
mov dword [esp + 0x10], edx
mov dword [esp + 8], eax
xor ecx, ecx
mov edx, 0x88
movzx eax, byte [0x77618d]
call fcn.00490be0
test eax, eax
je 0x4aeb3c
push 0x88
push ebx
mov dword [esp + 0xc], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 8]
mov ebx, esi
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov edx, ecx
and edx, esi
movdqu xmm0, xmmword [eax + edx]
pmovmskb esi, xmm0
test esi, esi
jne 0x4aebb4
mov edi, 0x10
nop word cs:[eax + eax]
nop dword [eax + eax]
add edx, edi
add edi, 0x10
and edx, ecx
movdqu xmm0, xmmword [eax + edx]
pmovmskb esi, xmm0
test esi, esi
je 0x4aeba0
tzcnt esi, esi
add esi, edx
and esi, ecx
movzx edx, byte [eax + esi]
test dl, dl
js 0x4aebd4
movdqa xmm0, xmmword [eax]
pmovmskb edx, xmm0
tzcnt esi, edx
movzx edx, byte [eax + esi]
lea edi, [esi - 0x10]
shr ebx, 0x19
and dl, 1
and edi, ecx
mov byte [eax + esi], bl
movzx ecx, dl
neg esi
mov byte [eax + edi + 0x10], bl
mov ebx, dword [esp + 8]
imul edx, esi, 0x58
lea esi, [esp + 0x228]
lea edi, [eax + edx - 0x54]
sub dword [ebx + 8], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + edx - 0x58], ecx
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
mov dword [eax + edx - 0x10], 1
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0xc]
mov dword [eax + edx - 0xc], ecx
mov dword [eax + edx - 8], 0
mov dword [eax + edx - 4], 1
inc dword [ebx + 0xc]
jmp 0x4aed58
cmp dword [esp + 4], ebx
jbe 0x4aeb3c
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 8]
lea esi, [ebx + eax]
xor eax, eax
mov ecx, edx
cmp esi, edx
cmovb ecx, eax
sub esi, ecx
lea ecx, [esi + esi*8]
mov dword [esp + 0x1c], esi
mov esi, dword [edi + ecx*8]
mov dword [esp + 0x18], esi
lea esi, [edi + ecx*8 + 4]
lea edi, [esp + 0x188]
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
mov esi, ebx
not esi
add esi, dword [esp + 4]
cmp esi, ebx
jae 0x4aecb4
mov edi, dword [esp + 0x1c]
lea ecx, [edi + 1]
cmp ecx, edx
mov ecx, edx
cmovae eax, edx
mov edx, dword [esp + 8]
neg eax
lea eax, [edi + eax + 1]
push esi
push edi
push eax
call fcn.004b6ba0
add esp, 0xc
mov esi, dword [esp + 0xc]
jmp 0x4aecde
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
lea ecx, [edi + 1]
cmp ecx, edx
mov ecx, edx
cmovae eax, edx
mov edx, dword [esp + 8]
neg eax
lea eax, [edi + eax + 1]
mov dword [esi + 0x20], eax
push ebx
push eax
push edi
call fcn.004b6ba0
add esp, 0xc
mov eax, dword [esp + 4]
lea edi, [esp + 0x1e0]
mov ecx, 0x11
dec eax
mov dword [esi + 0x24], eax
lea esi, [esp + 0x188]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x18]
mov eax, ecx
neg eax
jo 0x4aeb3c
mov dword [esp + 0x188], ecx
lea edi, [esp + 0x18c]
lea esi, [esp + 0x1e0]
mov ecx, 0x11
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x188]
call fcn.004a2e00
lea ecx, [esp + 0x100]
call fcn.004a2ea0
mov esi, dword [esp + 0xc]
xor edi, edi
cmp edi, dword [esp + 0xa8]
jo 0x4aed58
lea ecx, [esp + 0xa8]
call fcn.004a2e00
mov ebx, dword [esp + 0x54]
lea eax, [esi + 0x18]
mov dword [esp + 0x20], eax
test ebx, ebx
js 0x4aeb3c
mov edi, dword [esp + 0x50]
je 0x4aed8a
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, ebx
call fcn.00490be0
test eax, eax
jne 0x4aed8f
jmp 0x4aeb3c
mov eax, 1
mov dword [esp + 4], ebx
push ebx
push edi
mov dword [esp + 0x10], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ebx, dword [esp + 0x60]
test ebx, ebx
js 0x4aeb3c
mov edi, dword [esp + 0x5c]
je 0x4aedcd
movzx eax, byte [0x77618d]
xor ecx, ecx
mov edx, ebx
call fcn.00490be0
test eax, eax
jne 0x4aedd2
jmp 0x4aeb3c
mov eax, 1
push ebx
push edi
mov dword [esp + 0x18], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, word [esp + 0x92]
movzx edi, word [esp + 0x90]
mov word [esp + 0x28], ax
xor eax, eax
mov word [esp + 0x18], di
cmp eax, dword [esp + 0x64]
jno 0x4aee10
mov dword [esp + 0x14], 0x80000000
jmp 0x4aef13
mov edi, dword [esp + 0x6c]
test edi, edi
js 0x4aeb3c
mov ecx, dword [esp + 0x68]
je 0x4aee44
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov edx, edi
movzx eax, byte [0x77618d]
call fcn.00490be0
test eax, eax
je 0x4aeb3c
mov ecx, dword [esp + 0x1c]
jmp 0x4aee49
mov eax, 1
mov dword [esp + 0x14], edi
push edi
push ecx
mov dword [esp + 0x40], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor ecx, ecx
mov eax, dword [esp + 0x88]
cmp ecx, dword [esp + 0x70]
mov dword [esp + 0x34], eax
jno 0x4aee76
mov ecx, 0x80000000
jmp 0x4aeea9
mov edx, dword [esp + 0x74]
lea ecx, [esp + 0x100]
push dword [esp + 0x78]
call fcn.00412690
add esp, 4
mov eax, dword [esp + 0x104]
mov ecx, dword [esp + 0x100]
mov edx, dword [esp + 0x108]
mov dword [esp + 0xa4], eax
xor eax, eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], edx
cmp eax, dword [esp + 0x7c]
jno 0x4aeec3
mov dword [esp + 0x3c], 0x80000000
jmp 0x4aef07
mov edx, dword [esp + 0x80]
lea ecx, [esp + 0x100]
push dword [esp + 0x84]
call fcn.00412690
add esp, 4
mov eax, dword [esp + 0x100]
mov edx, dword [esp + 0x104]
mov ecx, dword [esp + 0x108]
mov dword [esp + 0x3c], eax
mov dword [esp + 0xa0], edx
mov dword [esp + 0x9c], ecx
movzx eax, byte [esp + 0x8c]
mov byte [esp + 0x33], al
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x24]
mov dword [esp + 0x1c], ebx
cmp eax, edx
jne 0x4aef30
mov ecx, dword [esp + 0x20]
call fcn.004b6dc0
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 4]
mov ebx, dword [esp + 8]
mov esi, dword [ecx + 0x20]
xor ecx, ecx
add esi, eax
cmp esi, edx
cmovb edx, ecx
inc eax
sub esi, edx
lea edx, [esi + esi*8]
mov esi, dword [esp + 0xc]
mov esi, dword [esi + 0x1c]
mov dword [esi + edx*8], edi
mov dword [esi + edx*8 + 4], ebx
mov dword [esi + edx*8 + 8], edi
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x10]
mov dword [esi + edx*8 + 0xc], edi
mov dword [esi + edx*8 + 0x10], ebx
mov dword [esi + edx*8 + 0x14], edi
mov edi, dword [esp + 0x14]
movzx ebx, byte [esp + 0x33]
mov dword [esi + edx*8 + 0x18], edi
mov dword [esi + edx*8 + 0x20], edi
mov edi, dword [esp + 0x38]
mov dword [esi + edx*8 + 0x1c], edi
mov edi, dword [esp + 0x44]
mov dword [esi + edx*8 + 0x24], edi
mov edi, dword [esp + 0x40]
mov dword [esi + edx*8 + 0x2c], edi
mov edi, dword [esp + 0xa4]
mov dword [esi + edx*8 + 0x28], edi
mov edi, dword [esp + 0x3c]
mov dword [esi + edx*8 + 0x30], edi
mov edi, dword [esp + 0x9c]
mov dword [esi + edx*8 + 0x38], edi
mov edi, dword [esp + 0xa0]
mov dword [esi + edx*8 + 0x34], edi
mov edi, dword [esp + 0x34]
mov dword [esi + edx*8 + 0x3c], edi
mov byte [esi + edx*8 + 0x40], bl
movzx edi, word [esp + 0x18]
movzx ebx, word [esp + 0x28]
mov word [esi + edx*8 + 0x44], di
mov word [esi + edx*8 + 0x46], bx
mov esi, dword [esp + 0xc]
mov dword [esi + 0x24], eax
cmp eax, dword [esi + 0x48]
xchg byte [esi + 0x10], cl
jbe 0x4af0c9
mov edi, dword [esp + 0x2c]
cmp cl, 2
jne 0x4af009
push edi
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
cmp dword [esi + 0x48], 0
je 0x4aeb3c
cmp dword [esi + 0x4c], 0
je 0x4aeb3c
mov cl, 1
xor eax, eax
lock cmpxchg byte [edi], cl
jne 0x4af370
mov eax, dword [esi + 0x24]
test eax, eax
je 0x4aeb3c
mov ecx, dword [esi + 0x20]
mov edi, esi
mov esi, dword [esi + 0x18]
xor ebx, ebx
lea edx, [ecx + 1]
cmp edx, esi
mov edx, dword [edi + 0x1c]
cmovb esi, ebx
dec eax
neg esi
lea esi, [ecx + esi + 1]
lea ecx, [ecx + ecx*8]
mov dword [edi + 0x20], esi
mov dword [edi + 0x24], eax
mov eax, dword [edx + ecx*8]
mov esi, eax
neg esi
jo 0x4aeb3c
lea esi, [edx + ecx*8]
mov dword [esp + 0x1e0], eax
lea edi, [esp + 0x1e4]
mov ecx, 0x11
lea eax, [esp + 0x1e0]
add esi, 4
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x100]
mov edx, dword [esp + 0x24]
push eax
call fcn.004b6860
add esp, 4
cmp ebx, dword [esp + 0x100]
jno 0x4af0e6
lea esi, [esp + 0x104]
lea edi, [esp + 0x18c]
mov ecx, 0x14
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x188], 0x80000000
jmp 0x4af10a
mov eax, dword [esp + 0x2c]
cmp cl, 2
lea edi, [esp + 0x4c]
jne 0x4ae6bd
push eax
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
jmp 0x4ae6bd
lea edi, [esp + 0x188]
lea esi, [esp + 0x100]
mov ecx, 0x16
xor eax, eax
rep movsd dword es:[edi], dword [esi]
cmp eax, dword [esp + 0x188]
jno 0x4aeb3c
mov eax, dword [esp + 0x1d4]
mov edx, dword [eax - 4]
test edx, edx
je 0x4aeb3c
mov ecx, dword [esp + 0x18c]
mov edi, dword [eax - 0x10]
xor ebx, ebx
mov dword [esp + 4], ecx
mov ecx, dword [eax - 8]
lea esi, [ecx + 1]
cmp esi, edi
mov esi, dword [esp + 0x1d8]
cmovae ebx, edi
dec edx
neg ebx
lea edi, [ecx + ebx + 1]
mov dword [esp + 0xc], esi
mov esi, dword [eax - 0xc]
mov dword [eax - 8], edi
mov edi, ecx
mov dword [eax - 4], edx
shl edi, 7
lea edi, [edi + ecx*8]
mov ecx, dword [esi + edi + 4]
cmp ecx, 0x80000001
je 0x4aeb3c
add esi, edi
mov edi, dword [esi]
add esi, 8
test edx, edx
mov dword [esp + 0x100], edi
mov dword [esp + 0x104], ecx
lea edi, [esp + 0x108]
mov ecx, 0x20
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [esp + 0x2c]
je 0x4af1c0
lea ecx, [esp + 0x100]
call fcn.004a2ea0
neg dword [esp + 4]
lea edi, [esp + 0x4c]
jo 0x4af327
lea ecx, [esp + 0x18c]
call fcn.004a2e00
jmp 0x4af327
mov esi, dword [esp + 0xc]
pcmpeqd xmm1, xmm1
mov ecx, dword [esi]
mov edx, ecx
sub edx, eax
sar edx, 3
imul edx, edx, 0xba2e8ba3
lea edi, [edx - 0x10]
movdqu xmm2, xmmword [ecx + edx]
mov dword [esp + 8], edx
and edi, dword [esi + 4]
pcmpeqb xmm2, xmm1
movdqu xmm0, xmmword [ecx + edi]
pmovmskb edx, xmm2
pcmpeqb xmm0, xmm1
pmovmskb esi, xmm0
test esi, esi
je 0x4af208
bsr si, si
xor esi, 0xf
jmp 0x4af20c
mov si, 0x10
or edx, 0x10000
tzcnt edx, edx
add esi, edx
mov dl, 0x80
cmp si, 0xf
ja 0x4af229
mov edx, dword [esp + 0xc]
inc dword [edx + 8]
mov dl, 0xff
mov esi, dword [esp + 8]
add eax, 0xffffffa8
mov byte [ecx + esi], dl
mov byte [ecx + edi + 0x10], dl
mov ecx, dword [esp + 0xc]
lea edi, [esp + 0xa8]
mov esi, eax
dec dword [ecx + 0xc]
neg dword [esp + 4]
mov ecx, 0x16
rep movsd dword es:[edi], dword [esi]
jo 0x4af260
lea ecx, [esp + 0x18c]
call fcn.004a2e00
mov ecx, dword [esp + 0xf4]
mov eax, dword [esp + 0xf0]
mov esi, dword [esp + 0xf8]
mov edi, dword [esp + 0xfc]
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0xa8]
mov dword [esp + 4], eax
call fcn.004a2e00
test edi, edi
je 0x4af2fe
mov edx, dword [esp + 4]
xor eax, eax
cmp esi, edx
mov ecx, edx
mov ebx, edx
cmovb ecx, eax
sub esi, ecx
mov ecx, edi
sub ebx, esi
mov dword [esp + 8], ecx
sub edi, ebx
mov dword [esp + 0x10], ebx
lea ebx, [esi + ecx]
cmova ebx, edx
cmovb edi, eax
sub ebx, esi
je 0x4af2dc
mov eax, esi
shl eax, 7
lea esi, [eax + esi*8]
add esi, dword [esp + 0xc]
mov ecx, esi
call fcn.004a2ea0
add esi, 0x88
dec ebx
jne 0x4af2cc
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
cmp eax, dword [esp + 8]
jae 0x4af2fe
mov esi, dword [esp + 0xc]
mov ecx, esi
call fcn.004a2ea0
add esi, 0x88
dec edi
jne 0x4af2ee
cmp dword [esp + 4], 0
je 0x4af317
push dword [esp + 0xc]
push 0
push dword [0x776180]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea ecx, [esp + 0x100]
call fcn.004a2ea0
lea edi, [esp + 0x4c]
xor eax, eax
xor esi, esi
xchg byte [ebx], al
cmp al, 2
jne 0x4af338
push ebx
call dword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle]
cmp esi, dword [esp + 0x188]
jo 0x4ae6bd
lea ecx, [esp + 0x188]
call fcn.004a2e00
jmp 0x4ae6bd
mov ecx, dword [esp + 0x2c]
call fcn.004e59e0
mov edi, dword [esp + 0x54]
test edi, edi
jns 0x4ae697
jmp 0x4aeb3c
mov ecx, edi
call fcn.004e59e0
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x4af036
jmp 0x4aeb3c