Function at 0x5c8562
Capabilities:
Hook routines via microsoft detours

Disassembly:
sub esp, 0x40
push ebx
push ebp
push esi
mov esi, eax
cmp esi, 0x7ff80000
push edi
jbe 0x5c857f
lea ebx, [esi - 0x7ff80000]
mov dword [esp + 0x10], ebx
jmp 0x5c858b
mov dword [esp + 0x10], 0x10000
mov ebx, dword [esp + 0x10]
cmp esi, 0x80000000
jae 0x5c859f
lea edi, [esi + 0x7ff80000]
mov dword [esp + 0x14], edi
jmp 0x5c85ab
mov dword [esp + 0x14], 0xfff80000
mov edi, dword [esp + 0x14]
mov eax, dword [0x10042678]
test eax, eax
mov edx, dword [0x10042674]
jne 0x5c85c5
test edx, edx
je 0x5c85d8
mov eax, edx
mov dword [0x10042678], eax
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x5c85d8
cmp ecx, ebx
jb 0x5c85d8
cmp ecx, edi
jbe 0x5c875f
test edx, edx
mov eax, edx
mov dword [0x10042678], eax
je 0x5c8606
test eax, eax
je 0x5c85fa
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x5c85fa
cmp ecx, ebx
jb 0x5c85fa
cmp ecx, edi
jbe 0x5c875a
mov eax, dword [eax + 4]
test eax, eax
jne 0x5c85e7
mov dword [0x10042678], eax
mov ebp, dword [0x100300e8]
mov eax, esi
and eax, 0xffff
sub esi, eax
cmp esi, ebx
mov ebx, dword [0x1003013c]
mov edi, esi
jbe 0x5c8684
nop
cmp edi, 0x70000000
jb 0x5c8637
cmp edi, 0x80000000
ja 0x5c8637
mov edi, 0x6fff0000
push 0x1c
lea ecx, [esp + 0x38]
push ecx
push edi
call ebp
test eax, eax
je 0x5c8684
mov ecx, dword [esp + 0x44]
mov eax, 0x10000
cmp ecx, eax
jne 0x5c8658
cmp dword [esp + 0x40], eax
jae 0x5c866c
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x10]
add edi, 0xffff0000
cmp edi, eax
ja 0x5c8622
jmp 0x5c8684
push 0x40
push 0x3000
push eax
push edi
call ebx
test eax, eax
mov dword [0x10042678], eax
jne 0x5c8717
mov edi, dword [esp + 0x14]
cmp esi, edi
jae 0x5c870d
mov edi, edi
cmp esi, 0x70000000
jb 0x5c86a7
cmp esi, 0x80000000
ja 0x5c86a7
mov esi, 0x80010000
push 0x1c
lea edx, [esp + 0x1c]
push edx
push esi
call ebp
test eax, eax
je 0x5c870d
mov eax, dword [esp + 0x28]
mov edx, 0x10000
cmp eax, edx
jne 0x5c86fe
cmp dword [esp + 0x24], edx
jb 0x5c86fe
mov ecx, esi
and ecx, 0xffff
je 0x5c86ea
mov esi, dword [esp + 0x24]
mov eax, edx
sub eax, ecx
sub esi, eax
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x18]
add esi, eax
mov dword [esp + 0x18], esi
push 0x40
push 0x3000
push edx
push esi
call ebx
test eax, eax
mov dword [0x10042678], eax
jne 0x5c8717
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
lea esi, [eax + ecx]
cmp esi, edi
jb 0x5c8692
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
mov ecx, dword [0x10042674]
xor edx, edx
mov dword [eax + 4], ecx
mov dword [eax], 0x52727464
mov dword [eax + 8], edx
mov dword [0x10042674], eax
lea ecx, [eax + 0xffe0]
mov esi, 0x7fd
lea esp, [esp]
mov dword [ecx + 0x18], edx
mov edx, ecx
sub ecx, 0x20
dec esi
jne 0x5c8742
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov dword [eax + 8], edx
jmp 0x5c875f
mov dword [0x10042678], eax
mov ecx, dword [eax + 8]
cmp ecx, ebx
jb 0x5c870d
cmp ecx, edi
ja 0x5c870d
mov edx, dword [ecx + 0x18]
mov dword [eax + 8], edx
mov eax, 0xcccccccc
mov edx, ecx
mov dword [edx], eax
mov dword [edx + 4], eax
mov dword [edx + 8], eax
mov dword [edx + 0xc], eax
mov dword [edx + 0x10], eax
pop edi
mov dword [edx + 0x14], eax
pop esi
mov dword [edx + 0x18], eax
pop ebp
mov dword [edx + 0x1c], eax
mov eax, ecx
pop ebx
add esp, 0x40
ret