Function at 0x41d980
Capabilities:
Allocate or change rwx memory
Check for software breakpoints
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x454100]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
test edx, edx
je 0x41d9b6
mov dword [edx], esi
test eax, eax
je 0x41d9bc
mov dword [eax], esi
test ecx, ecx
je 0x41d9c2
mov dword [ecx], esi
test ebx, ebx
jne 0x41d9dc
pop edi
pop esi
lea eax, [ebx + 0x57]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00440370
mov esp, ebp
pop ebp
ret 0x14
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x4551d0], eax
je 0x41da01
pop edi
pop esi
mov eax, 0x10dd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00440370
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [0x4551d4]
test eax, eax
jne 0x41de1e
test edi, edi
je 0x41da28
mov eax, dword [edi]
test eax, eax
jne 0x41da40
mov dword [0x4551d4], 6
mov dword [0x4551d8], edi
pop edi
pop esi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00440370
mov esp, ebp
pop ebp
ret 0x14
xor edi, edi
push edi
push eax
call fcn.0041de40
push edi
push ebx
mov dword [ebp - 0x14], eax
call fcn.0041de40
mov edx, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x34], edx
cmp edx, eax
jne 0x41da72
cmp dword [0x4551c8], esi
jne 0x41ddfa
xor ebx, ebx
jmp 0x41ddcb
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x41da7b
mov dword [ecx], eax
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41da84
mov dword [eax], edx
push 0x18
call fcn.00440383
mov ebx, eax
add esp, 4
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x41ddc6
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.0041d5b0
mov ecx, dword [0x4551c4]
add esp, 0xc
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x24]
mov eax, dword [0x4551c0]
test ecx, ecx
jne 0x41dad0
test eax, eax
je 0x41dae3
mov ecx, eax
mov dword [0x4551c4], ecx
mov edx, dword [ecx + 8]
test edx, edx
je 0x41dae3
cmp edx, esi
jb 0x41dae3
cmp edx, ebx
jbe 0x41db73
mov ecx, eax
mov dword [0x4551c4], ecx
test eax, eax
je 0x41db11
mov edx, eax
mov eax, dword [edx + 8]
test eax, eax
je 0x41db00
cmp eax, esi
jb 0x41db00
cmp eax, ebx
jbe 0x41db73
mov ecx, dword [ecx + 4]
mov eax, ecx
mov dword [0x4551c4], ecx
mov edx, ecx
test eax, eax
jne 0x41daf1
push ebx
mov eax, edi
and eax, 0xffff0000
push esi
push eax
call fcn.0041d420
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x41ddbc
mov dword [ecx], 0x52727464
xor edx, edx
mov dword [ecx + 8], 0
mov esi, 0x38b
mov eax, dword [0x4551c0]
mov dword [ecx + 4], eax
lea eax, [ecx + 0xffa8]
mov dword [0x4551c4], ecx
mov dword [0x4551c0], ecx
jmp 0x41db60
mov dword [eax + 0x40], edx
mov edx, eax
sub eax, 0x48
sub esi, 1
jne 0x41db60
mov esi, dword [ebp - 0x24]
mov dword [ecx + 8], edx
mov edi, dword [ecx + 8]
mov dword [ebp - 0x1c], edi
cmp edi, esi
jb 0x41ddbc
cmp edi, ebx
ja 0x41ddbc
mov eax, dword [edi + 0x40]
push 0x48
push 0xcc
push edi
mov dword [ecx + 8], eax
call sub.msvcrt.dll_memset
mov ecx, edi
add esp, 0xc
test ecx, ecx
je 0x41ddc0
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x41dbb2
mov dword [eax], ecx
mov edi, dword [ebp - 0x14]
lea eax, [ecx + 0x38]
xor edx, edx
mov dword [ebp - 0x48], eax
mov dword [eax], edx
mov ebx, ecx
mov dword [eax + 4], edx
lea eax, [ecx + 0x1e]
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x30], eax
mov eax, ecx
mov byte [ebp - 0x15], cl
mov dword [ebp - 0x28], eax
jmp 0x41dbe3
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov esi, edi
lea eax, [ebp - 0x10]
mov dword [ebp - 0x4c], ecx
push eax
push 0
push edi
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], 0
push eax
push ebx
call fcn.0041ed70
mov edx, dword [ebp - 0x48]
mov edi, eax
mov eax, dword [ebp - 0x10]
sub eax, esi
add eax, edi
add ebx, eax
mov dword [ebp - 0x24], ebx
mov ebx, edi
sub ebx, dword [ebp - 0x14]
mov cl, byte [ebp - 0x24]
mov al, bl
sub cl, byte [ebp - 0x15]
and al, 7
shl cl, 3
xor cl, al
mov eax, dword [ebp - 0x30]
mov byte [edx + eax], cl
inc eax
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
cmp eax, 8
jae 0x41dcaa
mov al, byte [esi]
cmp al, 0xeb
je 0x41dcaa
cmp al, 0xe9
je 0x41dcaa
cmp al, 0xe0
je 0x41dcaa
cmp al, 0xc2
je 0x41dcaa
cmp al, 0xc3
je 0x41dcaa
cmp al, 0xcc
je 0x41dcaa
cmp al, 0xf3
jne 0x41dca0
cmp byte [esi + 1], 0xc3
je 0x41dcaa
cmp al, 0x26
je 0x41dc76
cmp al, 0x2e
je 0x41dc76
cmp al, 0x36
je 0x41dc76
cmp al, 0x3e
je 0x41dc76
cmp al, 0x64
je 0x41dc76
cmp al, 0x65
jne 0x41dc82
cmp byte [esi + 1], 0xff
jne 0x41dc82
cmp byte [esi + 2], 0x25
je 0x41dcaa
mov esi, dword [ebp - 0x4c]
mov ecx, esi
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], ecx
cmp ebx, 5
jb 0x41dbe0
mov dword [ebp - 0x28], eax
mov edi, esi
jmp 0x41dcdf
cmp al, 0xff
jne 0x41dc5e
cmp byte [esi + 1], 0x25
jmp 0x41dc80
cmp ebx, 5
jae 0x41dccf
nop
push edi
call fcn.0041d6a0
add esp, 4
test eax, eax
je 0x41dda6
mov edx, dword [ebp - 0x14]
add edi, eax
mov ebx, edi
sub ebx, edx
cmp ebx, 5
jb 0x41dcb0
cmp dword [ebp - 0x30], 8
ja 0x41dda6
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0xc]
jbe 0x41dce8
int3
sub cl, al
mov byte [eax + 0x36], bl
push ebx
mov byte [eax + 0x1e], cl
add eax, 0x20
push edx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp ebx, 0x19
jbe 0x41dd10
mov ebx, dword [ebp - 0x20]
mov esi, 6
jmp 0x41ddcb
mov esi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x34]
add edx, ebx
movzx ecx, byte [esi + 0x1e]
add ecx, esi
mov dword [esi + 0x44], eax
mov dword [esi + 0x40], edx
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
lea eax, [ecx + 5]
mov dword [ecx + 1], edx
push dword [ebp - 0xc]
push eax
call fcn.0041d670
add esp, 8
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
push 0x40
push ebx
mov ebx, dword [ebp - 0x14]
push ebx
call sub.KERNEL32.dll_VirtualProtect
test eax, eax
jne 0x41dd68
call sub.KERNEL32.dll_GetLastError
mov ebx, dword [ebp - 0x20]
mov esi, eax
jmp 0x41ddcb
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x44]
pop edi
mov dword [ecx + 8], eax
mov dword [ecx + 0x10], esi
mov dword [ecx + 0xc], ebx
mov dword [ecx + 4], 0
mov eax, dword [ebp - 8]
mov dword [ecx + 0x14], eax
mov eax, dword [0x4551e0]
pop esi
mov dword [ecx], eax
xor eax, eax
mov dword [0x4551e0], ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00440370
mov esp, ebp
pop ebp
ret 0x14
cmp dword [0x4551c8], 0
mov esi, 9
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
jne 0x41ddd5
jmp 0x41ddcb
xor edi, edi
jmp 0x41ddc3
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov esi, 8
mov dword [0x4551d4], esi
test edi, edi
je 0x41ddeb
push edi
call fcn.0041d640
mov eax, dword [ebp - 0x38]
add esp, 4
test eax, eax
je 0x41ddeb
mov dword [eax], 0
test ebx, ebx
je 0x41ddfa
push 0x18
push ebx
call fcn.004403b3
add esp, 8
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x41de07
mov dword [eax], 0
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x41de14
mov dword [eax], 0
mov eax, dword [ebp - 0x44]
mov dword [0x4551d8], eax
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00440370
mov esp, ebp
pop ebp
ret 0x14