Function at 0x4af3e0
Capabilities:
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e0
mov eax, dword [0x616718]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2dc], ecx
test ecx, ecx
je 0x4af407
mov eax, dword [0x61bb50]
mov dword [ecx], eax
push esi
mov esi, dword [0x53d224]
call esi
cmp dword [0x61bb48], eax
je 0x4af42e
mov eax, 0x10dd
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051f6a1
mov esp, ebp
pop ebp
ret 4
cmp dword [0x61bb4c], 0
push ebx
push edi
je 0x4af505
call esi
cmp dword [0x61bb48], eax
jne 0x4af853
mov edi, dword [0x61bb58]
test edi, edi
je 0x4af4b5
lea eax, [ebp - 0x2dc]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call dword [0x53d088]
cmp dword [edi + 4], 0
jne 0x4af4a2
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x4af4a2
push 0x48
push 0
mov esi, ebx
push ebx
and esi, 0xffff0000
call fcn.00520dc2
mov eax, dword [esi + 8]
add esp, 0xc
mov dword [ebx + 0x40], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x10], 0
mov esi, dword [edi]
push 0x18
push edi
call fcn.0051f6b7
add esp, 8
mov edi, esi
test esi, esi
jne 0x4af455
mov dword [0x61bb58], 0
call fcn.004aee40
mov edi, dword [0x61bb54]
test edi, edi
je 0x4af4ec
mov ebx, dword [0x53d090]
push dword [edi + 4]
call ebx
mov esi, dword [edi]
push 8
push edi
call fcn.0051f6b7
add esp, 8
mov edi, esi
test esi, esi
jne 0x4af4d4
mov dword [0x61bb54], 0
mov dword [0x61bb48], 0
jmp 0x4af853
mov esi, dword [0x61bb58]
mov dword [ebp - 0x2d8], 0
test esi, esi
je 0x4af584
lea esp, [esp]
cmp dword [esi + 4], 0
mov ecx, dword [esi + 0x10]
je 0x4af547
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.00520dbc
mov ecx, dword [esi + 8]
add esp, 0xc
mov eax, dword [esi + 0xc]
mov dword [ecx], eax
jmp 0x4af57e
mov edx, dword [esi + 0xc]
mov ecx, dword [ecx + 0x44]
lea eax, [edx + 5]
mov byte [edx], 0xe9
sub ecx, eax
mov dword [edx + 1], ecx
add edx, 5
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx + 0x40]
cmp edx, eax
jae 0x4af579
sub eax, edx
push eax
push 0xcc
push edx
call fcn.00520dc2
mov ecx, dword [esi + 0x10]
add esp, 0xc
mov eax, dword [esi + 8]
mov dword [eax], ecx
mov esi, dword [esi]
test esi, esi
jne 0x4af520
mov ebx, dword [0x61bb54]
mov dword [ebp - 0x2d4], ebx
test ebx, ebx
je 0x4af69d
jmp 0x4af5a0
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x2d0], 0x10001
push eax
push dword [ebx + 4]
call dword [0x53d094]
test eax, eax
je 0x4af68d
mov esi, dword [0x61bb58]
test esi, esi
je 0x4af68d
cmp dword [esi + 4], 0
mov ecx, dword [ebp - 0x218]
je 0x4af629
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x4af683
lea eax, [edx + 4]
cmp ecx, eax
jae 0x4af683
xor eax, eax
lea edi, [edx + 0x38]
mov bl, byte [eax + edi]
mov dl, cl
sub dl, byte [esi + 0x10]
mov cl, bl
shr cl, 3
cmp cl, dl
je 0x4af61e
mov ecx, dword [ebp - 0x218]
inc eax
cmp eax, 8
jb 0x4af5f7
xor bl, bl
movzx eax, bl
add eax, dword [esi + 0xc]
jmp 0x4af667
and bl, 7
movzx eax, bl
add eax, dword [esi + 0xc]
jmp 0x4af667
mov edx, dword [esi + 0xc]
cmp ecx, edx
jb 0x4af683
mov edi, dword [esi + 0x10]
movzx eax, byte [edi + 0x36]
add eax, edx
cmp ecx, eax
jae 0x4af683
xor edx, edx
nop
mov bl, byte [edx + edi + 0x38]
sub cl, byte [esi + 0xc]
mov al, bl
and al, 7
cmp al, cl
je 0x4af65f
mov ecx, dword [ebp - 0x218]
inc edx
cmp edx, 8
jb 0x4af640
xor eax, eax
jmp 0x4af665
movzx eax, bl
shr eax, 3
add eax, edi
mov ebx, dword [ebp - 0x2d4]
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x2d0]
push eax
push dword [ebx + 4]
call dword [0x53d098]
mov esi, dword [esi]
test esi, esi
jne 0x4af5d0
mov ebx, dword [ebx]
mov dword [ebp - 0x2d4], ebx
test ebx, ebx
jne 0x4af5a0
call dword [0x53d1e4]
mov edi, dword [0x61bb58]
mov ebx, eax
mov dword [ebp - 0x2d4], ebx
test edi, edi
je 0x4af746
lea esp, [esp]
lea eax, [ebp - 0x2e0]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call dword [0x53d088]
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push ebx
call dword [0x53d09c]
cmp dword [edi + 4], 0
je 0x4af72f
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x4af729
push 0x48
push 0
mov esi, ebx
push ebx
and esi, 0xffff0000
call fcn.00520dc2
mov eax, dword [esi + 8]
add esp, 0xc
mov dword [ebx + 0x40], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov ebx, dword [ebp - 0x2d4]
mov esi, dword [edi]
push 0x18
push edi
call fcn.0051f6b7
add esp, 8
mov edi, esi
test esi, esi
jne 0x4af6c0
cmp dword [ebp - 0x2d8], 0
mov dword [0x61bb58], 0
je 0x4af7c9
cmp dword [0x61bb44], 0
jne 0x4af7c9
mov ecx, dword [0x61bb38]
mov ebx, 0x61bb38
test ecx, ecx
je 0x4af7c9
cmp dword [ecx], 0x52727464
jne 0x4af7c0
lea edi, [ecx + 0x10000]
xor esi, esi
lea edx, [ecx + 0x88]
mov eax, dword [edx]
test eax, eax
je 0x4af795
cmp eax, ecx
jb 0x4af7c0
cmp eax, edi
jae 0x4af7c0
inc esi
add edx, 0x48
cmp esi, 0x38d
jb 0x4af787
mov eax, dword [ecx + 4]
push 0x8000
push 0
push ecx
mov dword [ebx], eax
call dword [0x53d0a4]
mov dword [0x61bb3c], 0
jmp 0x4af7c3
lea ebx, [ecx + 4]
mov ecx, dword [ebx]
test ecx, ecx
jne 0x4af771
call dword [0x53d1e4]
mov esi, dword [0x61bb38]
mov edi, eax
test esi, esi
je 0x4af806
mov ebx, dword [0x53d088]
lea eax, [ebp - 0x2e0]
push eax
push 0x20
push 0x10000
push esi
call ebx
push 0x10000
push esi
push edi
call dword [0x53d09c]
mov esi, dword [esi + 4]
test esi, esi
jne 0x4af7e1
mov edi, dword [0x61bb54]
test edi, edi
je 0x4af82e
mov ebx, dword [0x53d090]
push dword [edi + 4]
call ebx
mov esi, dword [edi]
push 8
push edi
call fcn.0051f6b7
add esp, 8
mov edi, esi
test esi, esi
jne 0x4af816
mov ecx, dword [ebp - 0x2dc]
mov dword [0x61bb54], 0
mov dword [0x61bb48], 0
test ecx, ecx
je 0x4af853
mov eax, dword [0x61bb50]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, dword [0x61bb4c]
xor ecx, ebp
pop edi
pop ebx
pop esi
call fcn.0051f6a1
mov esp, ebp
pop ebp
ret 4