Function at 0x10006510
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30c
mov eax, dword [0x1001d080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
push 0x150
lea ecx, [ebp - 0x2c8]
push edi
push ecx
mov dword [ebp - 0x2e0], esi
mov dword [ebp - 0x2fc], eax
mov dword [ebp - 0x2d4], edi
call fcn.1000da00
add esp, 0xc
mov ecx, esi
mov dword [ebp - 0x2c8], 0x150
call fcn.10006330
push 0x40
lea edx, [ebp - 0x80]
mov ebx, eax
push edi
push edx
mov dword [ebp - 0x2f4], ebx
call fcn.1000da00
add esp, 0xc
push edi
push 0x40
lea eax, [ebp - 0x80]
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x100065b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadProcessMemory_idh__failed:__d_n
call fcn.100071c0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10008c28
mov esp, ebp
pop ebp
ret
mov ecx, 0x10
lea esi, [ebp - 0x80]
lea edi, [ebp - 0x2b4]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x5a4d
mov dword [ebp - 0x2c4], ebx
cmp word [ebp - 0x80], cx
jne 0x10006eab
push 0xf8
lea edx, [ebp - 0x178]
push 0
push edx
call fcn.1000da00
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x2e0]
add esp, 0xc
push 0
push 0xf8
lea eax, [ebp - 0x178]
push eax
add ecx, ebx
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x10006641
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadProcessMemory_inh__failed:__d_n
call fcn.100071c0
mov eax, dword [ebp - 0x2d4]
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10008c28
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x178], 0x4550
mov eax, dword [ebp - 0x44]
mov ecx, 0x3e
lea esi, [ebp - 0x178]
lea edi, [ebp - 0x274]
rep movsd dword es:[edi], dword [esi]
lea ecx, [eax + ebx]
mov dword [ebp - 0x2c0], ecx
jne 0x10006eab
xor esi, esi
cmp dword [ebp - 0xf8], esi
jne 0x1000669a
push str.No_IMAGE_DIRECTORY_ENTRY_IMPORT_n
call fcn.100071c0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10008c28
mov esp, ebp
pop ebp
ret
movzx edx, word [ebp - 0x164]
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0x2f0], esi
lea eax, [edx + eax + 0x18]
cmp cx, word [ebp - 0x172]
jae 0x1000677d
add eax, ebx
mov dword [ebp - 0x2d8], eax
mov ecx, dword [ebp - 0x2e0]
xor eax, eax
push eax
push 0x28
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x2d8]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x10006616
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
push edx
push eax
push edi
push str.ish__d__:_va_p_sr_d_n
call fcn.100071c0
mov eax, dword [ebp - 0x1c]
add esp, 0x10
cmp dword [ebp - 0xa0], 0
jne 0x10006757
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0xf8], ecx
jb 0x10006757
lea edx, [ecx + eax]
cmp dword [ebp - 0xf8], edx
jae 0x10006757
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0x9c], eax
add eax, dword [ebp - 0x18]
cmp esi, eax
jae 0x10006766
mov dword [ebp - 0x2f0], eax
mov esi, eax
movzx edx, word [ebp - 0x172]
add dword [ebp - 0x2d8], 0x28
inc edi
cmp edi, edx
jb 0x100066d0
push esi
push str.dwFileSize___08x_n
call fcn.100071c0
lea eax, [ebp - 0x178]
push eax
mov eax, dword [ebp - 0x2e0]
push ebx
call fcn.10006100
movzx eax, ax
mov dword [ebp - 0x300], eax
movzx eax, ax
lea ecx, [eax + esi]
push ecx
push esi
push eax
push str.ChkSum:__04x___08x____08x_n
mov dword [ebp - 0x308], eax
mov dword [ebp - 0x304], ecx
call fcn.100071c0
mov eax, dword [ebp - 0xf8]
mov ecx, dword [ebp - 0xf4]
add ecx, eax
add ecx, ebx
push ecx
add eax, ebx
push eax
push str._____Imports:__8p.._8p_n
call fcn.100071c0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0xf4]
lea eax, [ecx + ecx*4]
add eax, eax
add eax, eax
mov dword [ebp - 0x2cc], eax
lea eax, [eax + edx + 7]
and eax, 0xfffffff8
mov esi, ecx
shl esi, 4
add esi, eax
add esp, 0x2c
xor edi, edi
mov dword [ebp - 0x2e8], eax
mov dword [ebp - 0x2e4], esi
test ecx, ecx
je 0x10006850
lea ebx, [ebx]
mov eax, dword [ebp - 0x2fc]
mov eax, dword [eax + edi*4]
lea edx, [eax + 1]
mov dword [ebp - 0x2ec], edx
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10006832
sub eax, dword [ebp - 0x2ec]
inc edi
add eax, 4
and eax, 0xfffffffc
add dword [ebp - 0x2e4], eax
cmp edi, ecx
jb 0x10006820
mov eax, dword [ebp - 0x2e4]
push eax
call fcn.10008c1d
add esp, 4
mov dword [ebp - 0x2dc], eax
test eax, eax
jne 0x10006878
push str.new_BYTE__cbNew__failed._n
call fcn.100071c0
jmp 0x10006ea8
mov edi, dword [ebp - 0x2e4]
push edi
push 0
push eax
call fcn.1000da00
mov eax, dword [ebp - 0x154]
add eax, dword [ebp - 0x158]
add esp, 0xc
add eax, dword [ebp - 0x15c]
add eax, dword [ebp - 0x14c]
add eax, ebx
cmp ebx, eax
jae 0x100068aa
mov ebx, eax
push ebx
push str.pbBase___p_n
call fcn.100071c0
mov eax, ebx
mov ebx, dword [ebp - 0x2e0]
push edi
call fcn.100061f0
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x2ec], eax
cmp eax, ecx
jne 0x100068e4
push str.FindAndAllocateNearBase_failed._n
call fcn.100071c0
add esp, 4
jmp 0x10006e9c
mov edx, dword [ebp - 0xf8]
mov edi, dword [ebp - 0x2f4]
lea eax, [ebp - 0x2d0]
push eax
push 0x40
mov dword [ebp - 0x2d0], ecx
mov dword [ebp - 0x2b8], ecx
mov ecx, dword [ebp - 0xf4]
push ecx
add edx, edi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10006933
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualProtextEx_import__write_failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov eax, dword [ebp - 0x2d0]
push eax
push str.IMPORT_DIRECTORY_perms_x_n
call fcn.100071c0
mov eax, dword [ebp - 0x2ec]
mov edx, dword [ebp - 0xf4]
mov ecx, dword [ebp - 0x2d0]
add esp, 8
sub eax, edi
push 0
mov dword [ebp - 0x2d8], eax
mov eax, dword [ebp - 0x2cc]
add eax, dword [ebp - 0x2dc]
push edx
mov edx, dword [ebp - 0xf8]
push eax
add edx, edi
push edx
push ebx
mov dword [ebp - 0x2b8], ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x100069a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadProcessMemory_imports__failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x2f8], 0
jbe 0x10006aa4
mov edi, dword [ebp - 0x2dc]
mov ebx, dword [ebp - 0x2e8]
mov eax, dword [ebp - 0x2d8]
mov ecx, dword [ebp - 0x2dc]
add edi, 4
add eax, ebx
mov dword [ebp - 0x2cc], eax
lea ebx, [ebx + ecx + 4]
nop
mov eax, dword [ebp - 0x2f8]
mov edx, dword [ebp - 0x2fc]
mov edx, dword [edx + eax*4]
mov eax, dword [ebp - 0x2e4]
sub eax, esi
je 0x10006b5d
cmp eax, 0x7fffffff
ja 0x10006b5d
mov ecx, dword [ebp - 0x2dc]
add ecx, esi
call fcn.10005fe0
xor edx, edx
cmp eax, edx
jl 0x10006b5d
mov eax, dword [ebp - 0x2cc]
mov dword [edi - 4], eax
mov dword [ebx], edx
mov ecx, SysReAllocString
mov dword [ebx - 4], ecx
add eax, 8
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x2fc]
mov dword [ebx + 8], edx
mov dword [ebx + 4], ecx
mov ecx, dword [ebp - 0x2f8]
mov dword [edi], edx
mov dword [edi + 4], edx
mov edx, dword [ebp - 0x2d8]
add edx, esi
mov dword [edi + 8], edx
mov eax, dword [eax + ecx*4]
lea edx, [eax + 1]
mov dword [ebp - 0x2e8], edx
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10006a66
sub eax, dword [ebp - 0x2e8]
add dword [ebp - 0x2cc], 0x10
add eax, 4
and eax, 0xfffffffc
inc ecx
add esi, eax
add ebx, 0x10
add edi, 0x14
mov dword [ebp - 0x2f8], ecx
cmp ecx, dword [ebp + 0xc]
jb 0x100069e0
mov ebx, dword [ebp - 0x2e0]
mov edi, dword [ebp - 0x2f4]
mov eax, 0xcccccccd
mul dword [ebp - 0xf4]
shr edx, 4
add edx, dword [ebp + 0xc]
mov dword [ebp - 0x2cc], 0
je 0x10006b28
mov edi, dword [ebp - 0x2dc]
add edi, 8
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
mov edx, dword [edi]
push eax
mov eax, dword [edi - 4]
push ecx
mov ecx, dword [edi - 8]
push edx
mov edx, dword [ebp - 0x2cc]
push eax
push ecx
push edx
push str._8d._Look_08x_Time_08x_Fore_08x_Name_08x_Addr_08x_n
call fcn.100071c0
add esp, 0x1c
cmp dword [edi - 8], 0
jne 0x10006afd
cmp dword [edi + 8], 0
je 0x10006b22
mov ecx, dword [ebp - 0x2cc]
mov eax, 0xcccccccd
mul dword [ebp - 0xf4]
shr edx, 4
add edx, dword [ebp + 0xc]
inc ecx
add edi, 0x14
mov dword [ebp - 0x2cc], ecx
cmp ecx, edx
jb 0x10006aca
mov edi, dword [ebp - 0x2f4]
mov eax, dword [ebp - 0x2dc]
mov ecx, dword [ebp - 0x2ec]
push 0
push esi
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x10006b76
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteProcessMemory_iid__failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.StringCchCopyA_failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov eax, dword [ebp - 0xf8]
mov edx, dword [ebp - 0xf4]
add edx, eax
push edx
push eax
push str.obBase___p.._p_n
call fcn.100071c0
mov eax, dword [ebp - 0x2d8]
add esp, 0xc
lea ecx, [eax + esi]
push ecx
push eax
push str.obBase___p.._p_n
call fcn.100071c0
mov eax, dword [ebp - 0x2e4]
mov edx, dword [ebp - 0x2d8]
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0x90]
add esp, 0xc
mov dword [ebp - 0xf8], edx
test eax, eax
je 0x10006cb8
cmp dword [ebp - 0x8c], 0
je 0x10006cb8
push 0
push 0x14
lea ecx, [ebp - 0x40]
push ecx
lea esi, [eax + edi]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x10006c0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadProcessMemory_clr__failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x17c], eax
and eax, 0xfffffffe
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2d0]
push eax
push 4
push 0x14
push esi
lea edx, [esi + 0x10]
push ebx
mov dword [ebp - 0x2bc], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10006c56
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualProtextEx_clr__write_failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
push 0
push 0x14
lea ecx, [ebp - 0x40]
push ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x10006c83
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteProcessMemory_clr__failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov eax, dword [ebp - 0x2d0]
lea edx, [ebp - 0x2d0]
push edx
push eax
push 0x14
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10006cb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualProtextEx_clr__restore_failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov edx, dword [ebp - 0x124]
lea ecx, [ebp - 0x2d0]
push ecx
push 0x40
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10006ced
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualProtextEx_inh__write_failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor eax, eax
push eax
push 0x40
lea ecx, [ebp - 0x80]
push ecx
push edi
push ebx
mov word [ebp - 0x64], ax
call esi
test eax, eax
jne 0x10006d21
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteProcessMemory_idh__failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov eax, dword [ebp - 0x44]
push 0
push 0xf8
lea edx, [ebp - 0x178]
push edx
add eax, edi
push eax
push ebx
call esi
test eax, eax
jne 0x10006d55
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteProcessMemory_inh__failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
lea ecx, [ebp - 0x178]
push ecx
push edi
mov eax, ebx
call fcn.10006100
mov ecx, dword [ebp - 0x2f0]
movzx esi, ax
mov eax, esi
lea edx, [eax + ecx]
push edx
push ecx
push eax
push str.ChkSum:__04x___08x____08x_n
call fcn.100071c0
mov eax, dword [ebp - 0x300]
add esp, 0x18
cmp si, ax
sbb ecx, ecx
neg ecx
sub si, cx
mov cx, word [ebp - 0x64]
sub si, ax
movzx eax, si
cmp cx, ax
sbb edx, edx
push 0
neg edx
add dx, ax
push 0x40
lea eax, [ebp - 0x80]
push eax
push edi
sub cx, dx
push ebx
mov word [ebp - 0x64], cx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x10006d08
mov edx, dword [ebp - 0x2d0]
mov eax, dword [ebp - 0x124]
lea ecx, [ebp - 0x2d0]
push ecx
push edx
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x10006dff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualProtextEx_idh__restore_failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
lea ecx, [ebp - 0x178]
push ecx
push edi
mov eax, ebx
call fcn.10006100
mov ecx, dword [ebp - 0x2f0]
movzx edi, ax
mov esi, edi
lea eax, [esi + ecx]
push eax
push ecx
push esi
push str.ChkSum:__04x___08x____08x_n
mov dword [ebp - 0x2e8], eax
call fcn.100071c0
mov edx, dword [ebp - 0x2e8]
mov eax, dword [ebp - 0x304]
push edx
push eax
push str.Before:__08x__After:__08x_n
call fcn.100071c0
add esp, 0x24
cmp word [ebp - 0x300], di
je 0x10006e6a
mov ecx, dword [ebp - 0x308]
push esi
push ecx
push str.Restore_of_checksum_failed__04x____04x._n
call fcn.100071c0
add esp, 0xc
jmp 0x10006e9c
lea edx, [ebp - 0x2c8]
push edx
mov edi, ebx
call fcn.10006ed0
test eax, eax
jne 0x10006e92
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DetourCopyPayloadToProcess_failed:__d_n
call fcn.100071c0
add esp, 8
jmp 0x10006e9c
mov dword [ebp - 0x2d4], 1
mov eax, dword [ebp - 0x2dc]
push eax
call fcn.100094bd
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x2d4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10008c28
mov esp, ebp
pop ebp
ret