Function at 0x41df90
Capabilities:
Hook routines via microsoft detours
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x454100]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x41dfb4
mov eax, dword [0x4551d8]
mov dword [ecx], eax
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x4551d0], eax
je 0x41dfd6
mov eax, 0x10dd
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00440370
mov esp, ebp
pop ebp
ret 4
cmp dword [0x4551d4], 0
push esi
push edi
je 0x41e0d9
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x4551d0], eax
jne 0x41e3ed
mov edi, dword [0x4551e0]
test edi, edi
je 0x41e05c
lea eax, [ebp - 0x10]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call sub.KERNEL32.dll_VirtualProtect
cmp dword [edi + 4], 0
jne 0x41e049
mov esi, dword [edi + 0x10]
test esi, esi
je 0x41e049
push 0x48
push 0
push esi
call sub.msvcrt.dll_memset
mov ecx, esi
add esp, 0xc
and ecx, 0xffff0000
mov eax, dword [ecx + 8]
mov dword [esi + 0x40], eax
mov dword [ecx + 8], esi
mov dword [edi + 0x10], 0
mov esi, dword [edi]
push 0x18
push edi
call fcn.004403b3
add esp, 8
mov edi, esi
test esi, esi
jne 0x41e000
mov dword [0x4551e0], 0
call sub.KERNEL32.dll_GetCurrentProcess
mov esi, dword [0x4551c0]
mov edi, eax
test esi, esi
je 0x41e09b
lea eax, [ebp - 0x10]
push eax
push 0x20
push 0x10000
push esi
call sub.KERNEL32.dll_VirtualProtect
push 0x10000
push esi
push edi
call sub.KERNEL32.dll_FlushInstructionCache
mov esi, dword [esi + 4]
test esi, esi
jne 0x41e077
mov edi, dword [0x4551dc]
test edi, edi
je 0x41e0c0
push dword [edi + 4]
call sub.KERNEL32.dll_ResumeThread
mov esi, dword [edi]
push 8
push edi
call fcn.004403b3
add esp, 8
mov edi, esi
test esi, esi
jne 0x41e0a5
mov dword [0x4551dc], 0
mov dword [0x4551d0], 0
jmp 0x41e3ed
mov esi, dword [0x4551e0]
mov dword [ebp - 0xc], 0
test esi, esi
je 0x41e14f
lea ebx, [ebx]
cmp dword [esi + 4], 0
mov ecx, dword [esi + 0x10]
je 0x41e112
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call sub.msvcrt.dll_memcpy
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x41e144
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 eax, dword [esi + 0x10]
mov eax, dword [eax + 0x40]
cmp edx, eax
jae 0x41e141
sub eax, edx
push eax
push 0xcc
push edx
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x41e0f0
push ebx
mov ebx, dword [0x4551dc]
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x41e266
jmp 0x41e170
lea eax, [ebp - 0x2dc]
mov dword [ebp - 0x2dc], 0x10001
push eax
push dword [ebx + 4]
call sub.KERNEL32.dll_GetThreadContext
test eax, eax
je 0x41e259
mov esi, dword [0x4551e0]
test esi, esi
je 0x41e259
nop
cmp dword [esi + 4], 0
mov ecx, dword [ebp - 0x224]
je 0x41e1f9
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x41e24f
lea eax, [edx + 4]
cmp ecx, eax
jae 0x41e24f
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 0x41e1ee
mov ecx, dword [ebp - 0x224]
inc eax
cmp eax, 8
jb 0x41e1c7
xor bl, bl
movzx eax, bl
add eax, dword [esi + 0xc]
jmp 0x41e237
and bl, 7
movzx eax, bl
add eax, dword [esi + 0xc]
jmp 0x41e237
mov edx, dword [esi + 0xc]
cmp ecx, edx
jb 0x41e24f
mov edi, dword [esi + 0x10]
movzx eax, byte [edi + 0x36]
add eax, edx
cmp ecx, eax
jae 0x41e24f
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 0x41e22f
mov ecx, dword [ebp - 0x224]
inc edx
cmp edx, 8
jb 0x41e210
xor eax, eax
jmp 0x41e235
movzx eax, bl
shr eax, 3
add eax, edi
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x2dc]
push eax
push dword [ebx + 4]
call sub.KERNEL32.dll_SetThreadContext
mov esi, dword [esi]
test esi, esi
jne 0x41e1a0
mov ebx, dword [ebx]
mov dword [ebp - 8], ebx
test ebx, ebx
jne 0x41e170
call sub.KERNEL32.dll_GetCurrentProcess
mov edi, dword [0x4551e0]
mov ebx, eax
test edi, edi
je 0x41e2eb
lea eax, [ebp - 8]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call sub.KERNEL32.dll_VirtualProtect
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push ebx
call sub.KERNEL32.dll_FlushInstructionCache
cmp dword [edi + 4], 0
je 0x41e2d8
mov esi, dword [edi + 0x10]
test esi, esi
je 0x41e2d8
push 0x48
push 0
push esi
call sub.msvcrt.dll_memset
mov ecx, esi
mov dword [ebp - 0xc], 1
add esp, 0xc
and ecx, 0xffff0000
mov eax, dword [ecx + 8]
mov dword [esi + 0x40], eax
mov dword [ecx + 8], esi
mov dword [edi + 0x10], 0
mov esi, dword [edi]
push 0x18
push edi
call fcn.004403b3
add esp, 8
mov edi, esi
test esi, esi
jne 0x41e277
cmp dword [ebp - 0xc], 0
mov dword [0x4551e0], 0
je 0x41e36c
cmp dword [0x4551cc], 0
jne 0x41e36c
mov ecx, dword [0x4551c0]
mov edi, 0x4551c0
test ecx, ecx
je 0x41e36c
cmp dword [ecx], 0x52727464
je 0x41e320
lea edi, [ecx + 4]
jmp 0x41e366
lea ebx, [ecx + 0x10000]
xor edx, edx
lea esi, [ecx + 0x88]
mov edi, edi
mov eax, dword [esi]
test eax, eax
je 0x41e33e
cmp eax, ecx
jb 0x41e31b
cmp eax, ebx
jae 0x41e31b
inc edx
add esi, 0x48
cmp edx, 0x38d
jb 0x41e330
mov eax, dword [ecx + 4]
push 0x8000
push 0
push ecx
mov dword [edi], eax
call sub.KERNEL32.dll_VirtualFree
mov dword [0x4551c4], 0
mov ecx, dword [edi]
test ecx, ecx
jne 0x41e313
call sub.KERNEL32.dll_GetCurrentProcess
mov esi, dword [0x4551c0]
mov edi, eax
pop ebx
test esi, esi
je 0x41e3a4
mov edi, edi
lea eax, [ebp - 0xc]
push eax
push 0x20
push 0x10000
push esi
call sub.KERNEL32.dll_VirtualProtect
push 0x10000
push esi
push edi
call sub.KERNEL32.dll_FlushInstructionCache
mov esi, dword [esi + 4]
test esi, esi
jne 0x41e380
mov edi, dword [0x4551dc]
test edi, edi
je 0x41e3cb
mov edi, edi
push dword [edi + 4]
call sub.KERNEL32.dll_ResumeThread
mov esi, dword [edi]
push 8
push edi
call fcn.004403b3
add esp, 8
mov edi, esi
test esi, esi
jne 0x41e3b0
mov ecx, dword [ebp - 0x10]
mov dword [0x4551dc], 0
mov dword [0x4551d0], 0
test ecx, ecx
je 0x41e3ed
mov eax, dword [0x4551d8]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, dword [0x4551d4]
xor ecx, ebp
pop edi
pop esi
call fcn.00440370
mov esp, ebp
pop ebp
ret 4