Function at 0x401c5c
Capabilities:
Access pe header
Allocate or change rwx memory
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x31c
mov ebx, dword [ebp + 0x10]
lea esi, [ebp - 0x28]
mov dword [esp + 8], esi
lea eax, [ebp - 0x304]
mov dword [esp + 4], eax
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.00401b08
test al, al
je 0x401ddf
mov dword [ebp - 0x1c], 0
mov edx, dword [ebx + 0x34]
mov eax, dword [ebp - 0x28]
cmp edx, eax
je 0x401de8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtUnmapViewOfSection]
sub esp, 8
test eax, eax
js 0x401cfe
mov eax, dword [ebx + 0x34]
mov dword [ebp - 0x1c], eax
mov dword [esp + 0x14], 0x40
mov dword [esp + 0x10], 0x3000
lea eax, [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
lea esi, [ebp - 0x1c]
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
sub esp, 0x18
test eax, eax
js 0x401e28
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x401e2f
lea esi, [ebp - 0x1c]
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x260]
add eax, 8
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteProcessMemory
sub esp, 0x14
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_RtlImageNtHeader]
push ecx
mov ecx, 0x3e
mov edi, eax
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0x34], edx
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004023d8
test al, al
je 0x401ea4
mov dword [ebp - 0x304], 0x10007
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x28]
je 0x401ec4
add eax, dword [ebx + 0x28]
mov dword [ebp - 0x254], eax
lea eax, [ebp - 0x304]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sub.KERNEL32.dll_SetThreadContext
sub esp, 8
mov dword [esp + 8], str.LdrInitialize
mov dword [esp + 4], str.2010ClientHelper.dll
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.00401344
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sub.KERNEL32.dll_ResumeThread
push edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp + 0xc]
jb 0x401ca4
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
sub esp, 0x14
test eax, eax
jns 0x401cfe
mov dword [ebp - 0x1c], 0
mov eax, dword [ebx + 0xa4]
mov edx, dword [ebx + 0xa0]
test edx, edx
je 0x401ea4
test eax, eax
je 0x401ea4
mov dword [ebp - 0x1c], 0
mov dword [esp + 0x14], 0x40
mov dword [esp + 0x10], 0x3000
lea eax, [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
lea esi, [ebp - 0x1c]
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
sub esp, 0x18
test eax, eax
js 0x401e99
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040216c
mov edi, dword [ebp - 0x1c]
test edi, edi
jne 0x401d0c
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sub.KERNEL32.dll_TerminateProcess
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov eax, dword [ebx + 0x28]
add eax, dword [ebx + 0x34]
mov dword [ebp - 0x254], eax
jmp 0x401da0