Function at 0x30006560
Capabilities:
Allocate or change rwx memory
Check for software breakpoints
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
push edi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x30270328], 0
mov edx, eax
mov dword [esp + 0x10], edx
je 0x30006ae3
mov esi, dword [edi]
mov eax, dword [esi]
cmp eax, 0x80000004
jne 0x300068b7
mov ebx, dword [0x302736b8]
test ebx, ebx
je 0x300065ae
cmp dword [ebx], edx
je 0x300065c5
mov ebx, dword [ebx + 0x88]
test ebx, ebx
jne 0x300065a0
push edx
push str.CAPEExceptionFilter:_Cant_find_breakpoints_for_thread__d_n
call fcn.30009b40
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 4]
xor esi, esi
mov eax, dword [eax + 0x14]
mov edx, eax
nop
mov eax, 1
mov ecx, esi
shl eax, cl
test edx, eax
jne 0x300065e3
inc esi
cmp esi, 4
jb 0x300065d0
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], esi
cmp esi, 4
jne 0x3000660d
mov eax, dword [0x30273998]
test eax, eax
je 0x30006cb7
push edi
call eax
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x30273714]
test eax, eax
je 0x30006628
push eax
push str.CAPEExceptionFilter:_Anomaly_detected:_Trap_index_set_on_non_single_step:__d_n
call fcn.30009b40
mov edx, dword [esp + 0x18]
add esp, 8
cmp dword [0x30272c64], 0
jne 0x3000664e
cmp dword [0x3027220c], 0
jne 0x3000664e
mov eax, dword [edi]
push edx
push dword [eax + 0xc]
push esi
push str.CAPEExceptionFilter:_breakpoint__d_hit_by_instruction_at_0x_p__thread__d__n
call fcn.30009b40
add esp, 0x10
mov eax, esi
lea esi, [ebx + 8]
shl eax, 5
add esi, eax
jne 0x30006675
push dword [esp + 0x10]
push str.CAPEExceptionFilter:_Cant_get_BreakpointInfo_for_thread__d_n
call fcn.30009b40
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x300066d7
mov eax, dword [edi + 4]
mov ecx, dword [esi + 0xc]
mov edx, dword [eax + 4]
cmp ecx, edx
je 0x3000669c
push ecx
push edx
push str.CAPEExceptionFilter:_Anomaly_detected__bp0_address__0x_x__different_to_BreakpointInfo__0x_x___n
call fcn.30009b40
mov eax, dword [edi + 4]
add esp, 0xc
movzx edx, word [eax + 0x1a]
mov eax, dword [esi + 0x10]
and edx, 3
cmp eax, edx
je 0x30006834
cmp eax, 3
jne 0x300066cb
cmp edx, 1
jne 0x300066cb
mov ecx, dword [esi + 0xc]
call fcn.3004ea60
test eax, eax
jne 0x300067eb
mov eax, dword [esi + 0x10]
push eax
push edx
push str.CAPEExceptionFilter:_Anomaly_detected__bp0_type__0x_x__different_to_BreakpointInfo__0x_x___n
jmp 0x30006824
cmp eax, 1
jne 0x30006738
mov edx, dword [edi + 4]
mov eax, dword [esi + 0xc]
mov ecx, dword [edx + 8]
cmp eax, ecx
je 0x300066fb
push eax
push ecx
push str.CAPEExceptionFilter:_Anomaly_detected__bp1_address__0x_x__different_to_BreakpointInfo__0x_x___n
call fcn.30009b40
mov edx, dword [edi + 4]
add esp, 0xc
mov edx, dword [edx + 0x18]
mov eax, dword [esi + 0x10]
shr edx, 0x14
and edx, 3
cmp eax, edx
je 0x30006834
cmp eax, 3
jne 0x3000672c
cmp edx, 1
jne 0x3000672c
mov ecx, dword [esi + 0xc]
call fcn.3004ea60
test eax, eax
jne 0x300067eb
mov eax, dword [esi + 0x10]
push eax
push edx
push str.CAPEExceptionFilter:_Anomaly_detected__bp1_type__0x_x__different_to_BreakpointInfo__0x_x___n
jmp 0x30006824
cmp eax, 2
jne 0x3000679d
mov eax, dword [edi + 4]
mov ecx, dword [esi + 0xc]
mov edx, dword [eax + 0xc]
cmp ecx, edx
je 0x3000675c
push ecx
push edx
push str.CAPEExceptionFilter:_Anomaly_detected__bp2_address__0x_x__different_to_BreakpointInfo__0x_x___n
call fcn.30009b40
mov eax, dword [edi + 4]
add esp, 0xc
movzx edx, byte [eax + 0x1b]
mov eax, dword [esi + 0x10]
and edx, 3
cmp eax, edx
je 0x30006834
cmp eax, 3
jne 0x30006791
cmp edx, 1
jne 0x30006791
mov ecx, dword [esi + 0xc]
call fcn.3004ea60
test eax, eax
je 0x3000678e
push dword [esi + 4]
push str.CAPEExceptionFilter:_Reinstated_BP_READWRITE_on_stack_breakpoint__d__WoW64_workaround__n
jmp 0x300067f3
mov eax, dword [esi + 0x10]
push eax
push edx
push str.CAPEExceptionFilter:_Anomaly_detected__bp2_type__0x_x__different_to_BreakpointInfo__0x_x___n
jmp 0x30006824
cmp eax, 3
jne 0x30006834
mov edx, dword [edi + 4]
mov eax, dword [esi + 0xc]
mov ecx, dword [edx + 0x10]
cmp eax, ecx
je 0x300067c5
push eax
push ecx
push str.CAPEExceptionFilter:_Anomaly_detected__bp3_address__0x_x__different_to_BreakpointInfo__0x_x___n
call fcn.30009b40
mov edx, dword [edi + 4]
add esp, 0xc
mov edx, dword [edx + 0x18]
mov eax, dword [esi + 0x10]
shr edx, 0x1c
and edx, 3
cmp eax, edx
je 0x30006834
cmp eax, 3
jne 0x3000681d
cmp edx, 1
jne 0x3000681d
mov ecx, dword [esi + 0xc]
call fcn.3004ea60
test eax, eax
je 0x3000681a
push dword [esi + 4]
push str.CAPEExceptionFilter:_Reinstated_BP_READWRITE_on_breakpoint__d__WoW64_workaround__n
call fcn.30009b40
mov edx, dword [esi + 4]
add esp, 4
mov ecx, dword [edi + 4]
push dword [esi + 0x18]
push dword [esi + 0x14]
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [esi + 8]
call fcn.30007560
add esp, 0x18
jmp 0x30006834
mov eax, dword [esi + 0x10]
push eax
push edx
push str.CAPEExceptionFilter:_Anomaly_detected__bp3_type__0x_x__different_to_BreakpointInfo__0x_x___n
call fcn.30009b40
mov edx, dword [edi + 4]
add esp, 0xc
call fcn.300070d0
mov eax, dword [esi + 0x14]
test eax, eax
je 0x3000684e
add eax, 0xffffffff
mov dword [esi + 0x14], eax
jne 0x3000684e
mov edx, dword [esi + 4]
mov ecx, dword [edi + 4]
call fcn.30007400
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x3000686f
push dword [esp + 0x10]
push str.CAPEExceptionFilter:_Cant_find_callback__passing_exception__thread__d__n
call fcn.30009b40
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x1c], 0
jne 0x30006ba3
push edi
push esi
mov dword [esi + 0x1c], 1
call eax
mov dword [esi + 0x1c], 0
add esp, 8
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x300068a2
or dword [ecx + 0xc0], 0x10000
mov ecx, dword [edi + 4]
push ecx
mov edx, ebx
call fcn.300078b0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, reloc.WS2_32.dll_closesocket
jne 0x30006ae3
mov esi, dword [esi + 0xc]
cmp byte [esi], 0xcc
jne 0x30006ae3
mov ecx, dword [0x30245624]
mov eax, ecx
test eax, eax
je 0x30006922
lea ebx, [ebx]
cmp dword [eax + 4], esi
je 0x300068ed
mov eax, dword [eax]
test eax, eax
jne 0x300068e0
jmp 0x30006922
add eax, 0xc
je 0x30006922
test esi, esi
je 0x30006922
cmp byte [esi], 0xcc
jne 0x30006922
jmp 0x30006900
cmp dword [ecx + 4], esi
je 0x3000690d
mov ecx, dword [ecx]
test ecx, ecx
jne 0x30006900
jmp 0x30006914
lea ebx, [ecx + 0xc]
test ebx, ebx
jne 0x30006944
push esi
push str.SoftwareBreakpointHandler:_Unable_to_retrieve_instruction_byte_for_0x_p
call fcn.30009b40
add esp, 8
mov eax, dword [edi]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x30245608]
test eax, eax
je 0x300069df
cmp dword [eax + 4], ecx
je 0x30006987
mov eax, dword [eax]
test eax, eax
jne 0x30006934
jmp 0x300069df
lea eax, [esp + 0x14]
push eax
push 0x40
push 1
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x30006960
push esi
push str.SoftwareBreakpointHandler:_Unable_to_change_memory_protection_at_0x_p
jmp 0x3000691a
mov al, byte [ebx]
mov byte [esi], al
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
push 1
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, edi
call fcn.3001a8b0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add eax, 0xc
je 0x300069df
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0xb0]
call fcn.30009630
push eax
push 0x301e7978
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
test ebx, ebx
je 0x300069df
mov ecx, dword [edi]
mov edx, dword [ecx + 0xc]
mov ecx, dword [0x30245608]
test ecx, ecx
je 0x300069d1
cmp dword [ecx + 4], edx
je 0x30006aa0
mov ecx, dword [ecx]
test ecx, ecx
jne 0x300069c2
push edx
push str.SoftwareBreakpointHandler:_Unable_to_retrieve_instruction_length_for_0x_p
call fcn.30009b40
add esp, 8
mov ecx, dword [edi]
mov ecx, dword [ecx + 0xc]
call fcn.30003110
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
cmp byte [eax], 0xcc
je 0x30006a02
mov ecx, edi
call fcn.3001a8b0
test eax, eax
jne 0x30006ba3
cmp dword [0x30272c64], 0
je 0x30006a15
mov dword [0x30272548], 1
mov ecx, dword [edi]
mov edx, dword [ecx + 0xc]
mov esi, dword [0x3026d3e4]
cmp edx, esi
jb 0x30006a55
mov eax, dword [0x3026d3ec]
add eax, esi
cmp edx, eax
jae 0x30006a55
cmp dword [0x3026e7b4], 0
je 0x30006a40
cmp dword [ecx], 0x80000001
je 0x30006a55
sub edx, esi
push edx
push dword [ecx + 0x18]
push dword [ecx]
push str.CAPEExceptionFilter:_Exception_0x_x_accessing_0x_x_caught_at_RVA_0x_x_in_capemon__expected_in_memory_scans___passing_to_next_handler._n
call fcn.30009b40
add esp, 0x10
cmp dword [0x30272c64], 0
je 0x30006cb7
mov ecx, dword [edi]
lea edx, [esp + 0x14]
mov ecx, dword [ecx + 0xc]
call fcn.3004c8f0
mov ecx, dword [edi]
mov edx, dword [ecx + 0x10]
test eax, eax
je 0x30006c07
test edx, edx
jne 0x30006bad
push dword [ecx + 4]
push dword [esp + 0x14]
push dword [esp + 0x1c]
push eax
push dword [ecx + 0xc]
push dword [ecx]
push str._nException_0x_x_at_0x_p_in__s__RVA_0x_x__thread__d___flags_0x_x_n
jmp 0x30006c65
lea esi, [ecx + 0xc]
test esi, esi
je 0x300069d1
cmp dword [0x302721fc], 1
jne 0x30006ad0
mov eax, dword [edi + 4]
add dword [eax + 0xc4], 0xfffffffc
mov eax, dword [edi]
mov ecx, dword [eax + 0xc]
mov eax, dword [edi + 4]
add ecx, dword [esi]
mov eax, dword [eax + 0xc4]
mov dword [eax], ecx
mov eax, dword [edi + 4]
mov dword [eax + 0xb8], ebx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi]
mov eax, dword [ecx]
cmp eax, 0xc0000096
je 0x30006af9
cmp eax, 0xc000001d
jne 0x30006a17
mov esi, dword [edi + 4]
mov edx, dword [esi + 0xb8]
movzx eax, byte [edx]
cmp al, 0xf
jne 0x30006b1d
movzx eax, byte [edx + 1]
cmp al, 1
jne 0x30006b1d
movzx eax, byte [edx + 2]
cmp al, 0xf9
jne 0x30006b1d
xor eax, eax
jmp 0x30006b22
sbb eax, eax
or eax, 1
test eax, eax
jne 0x30006a17
cmp dword [0x30270330], eax
je 0x30006b7e
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [esp + 0x14]
push eax
push 0x40
push 3
push edx
call esi
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0xb8]
mov ax, word [0x301e7ee4]
mov word [ecx], ax
mov al, byte [0x301e7ee6]
mov byte [ecx + 2], al
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x18]
mov eax, dword [edi + 4]
push 3
push dword [eax + 0xb8]
call esi
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
rdtsc
mov dword [esi + 0xb0], eax
mov eax, dword [edi + 4]
mov dword [eax + 0xa8], edx
mov esi, dword [edi + 4]
mov ecx, dword [esi + 0xb8]
call fcn.300294e0
add dword [esi + 0xb8], eax
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edx, 1
jne 0x30006bd8
push dword [ecx + 0x14]
push dword [ecx + 4]
push dword [esp + 0x18]
push dword [esp + 0x20]
push eax
push dword [ecx + 0xc]
push dword [ecx]
push str._nException_0x_x_at_0x_p_in__s__RVA_0x_x__thread__d___flags_0x_x__exception_information_0x_p_n
call fcn.30009fe0
add esp, 0x20
jmp 0x30006c6d
cmp edx, 2
jne 0x30006c6d
push dword [ecx + 0x18]
push dword [ecx + 0x14]
push dword [ecx + 4]
push dword [esp + 0x1c]
push dword [esp + 0x24]
push eax
push dword [ecx + 0xc]
push dword [ecx]
push str._nException_0x_x_at_0x_p_in__s__RVA_0x_x__thread__d___flags_0x_x__exception_information_0__0x_p__exception_information_1__0x_p_n
call fcn.30009fe0
add esp, 0x24
jmp 0x30006c6d
test edx, edx
jne 0x30006c26
push dword [ecx + 4]
push dword [esp + 0x14]
push dword [ecx + 0xc]
push dword [ecx]
push str._nException_0x_x_at_0x_p__thread__d__flags_0x_x_n
call fcn.30009fe0
add esp, 0x14
jmp 0x30006c6d
cmp edx, 1
jne 0x30006c49
push dword [ecx + 0x14]
push dword [ecx + 4]
push dword [esp + 0x18]
push dword [ecx + 0xc]
push dword [ecx]
push str._nException_0x_x_at_0x_p__thread__d__flags_0x_x__exception_information_0x_p_n
call fcn.30009fe0
add esp, 0x18
jmp 0x30006c6d
cmp edx, 2
jne 0x30006c6d
push dword [ecx + 0x18]
push dword [ecx + 0x14]
push dword [ecx + 4]
push dword [esp + 0x1c]
push dword [ecx + 0xc]
push dword [ecx]
push str._nException_0x_x_at_0x_p__thread__d__flags_0x_x__exception_information_0__0x_p__exception_information_1__0x_p_n
call fcn.30009fe0
add esp, 0x1c
mov eax, dword [edi + 4]
push dword [eax + 0xb4]
push dword [eax + 0xc4]
push dword [eax + 0x9c]
push dword [eax + 0xa0]
push dword [eax + 0xa8]
push dword [eax + 0xac]
push dword [eax + 0xa4]
push dword [eax + 0xb0]
push str.EAX_0x_x_EBX_0x_x_ECX_0x_x_EDX_0x_x_ESI_0x_x_EDI_0x_x_ESP_0x_x_EBP_0x_x_n
call fcn.30009fe0
mov ecx, dword [edi]
add esp, 0x24
mov ecx, dword [ecx + 0xc]
call fcn.300166e0
cmp dword [0x30272c60], 0
je 0x30006cc8
mov ecx, dword [edi + 4]
call fcn.30007080
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret