Function at 0x40bd24
Capabilities:
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov eax, ecx
xor esi, esi
push edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], esi
push dword [eax + 0x10]
call dword [sym.imp.ntdll.dll_RtlNormalizeProcessParams]
mov edi, eax
mov dword [ebp - 0x20], esi
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x24], eax
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x1c], esi
inc ecx
mov dword [ebp - 8], esi
inc eax
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ecx
mov edx, esi
mov ebx, esi
test edi, edi
je 0x40be2f
mov eax, dword [edi + 0xc]
lea ecx, [edi + 0x40]
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x40bd86
cmp word [ecx], si
jne 0x40bd93
lea ecx, [edi + 0x38]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x40be07
movzx edi, word [ecx]
mov ebx, eax
mov dword [ebp - 4], edi
test edi, edi
je 0x40be04
cmp word [ebx], si
je 0x40be04
test edi, edi
je 0x40be04
movzx eax, word [ebx]
test ax, ax
je 0x40bdc5
push eax
call dword [sym.imp.ntdll.dll_iswspace]
pop ecx
test eax, eax
je 0x40bdc5
add ebx, 2
dec edi
sub edi, 1
jne 0x40bda8
mov dword [ebp - 4], edi
test edi, edi
je 0x40be04
cmp word [ebx], si
je 0x40bd9b
inc dword [ebp - 0xc]
mov dword [ebp - 0x28], ebx
add ebx, 2
dec edi
sub edi, 1
je 0x40bdef
movzx eax, word [ebx]
push eax
call dword [sym.imp.ntdll.dll_iswspace]
pop ecx
test eax, eax
je 0x40bdd7
mov ecx, dword [ebp - 8]
mov eax, ebx
sub eax, dword [ebp - 0x28]
sar eax, 1
lea ecx, [ecx + eax*2]
add ecx, 2
mov dword [ebp - 8], ecx
jmp 0x40bd98
mov edi, dword [ebp - 0x14]
mov ecx, dword [edi + 0x48]
mov edx, esi
test ecx, ecx
je 0x40be26
jmp 0x40be21
add ecx, 2
inc edx
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40be16
cmp word [ecx], si
jne 0x40be12
mov ecx, dword [ebp - 0xc]
lea eax, [edx + 1]
mov edx, dword [ebp - 0x10]
lea edi, [ecx + eax]
cmp edi, 2
jbe 0x40be6c
cmp ecx, 1
jbe 0x40be45
movzx ecx, word [edx]
mov ebx, dword [edx + 4]
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 8]
shl edi, 2
add eax, edi
push eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x2c]
push esi
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edx, eax
mov dword [ebp - 0x10], edx
test edx, edx
jne 0x40be9c
mov esi, 0xc0000017
lea ebx, [ebp - 0x18]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40be77
int3
test esi, esi
js 0x40be8c
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
push eax
push ebx
call fcn.00407875
pop ecx
pop ecx
mov esi, eax
push esi
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtTerminateProcess]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0xc], 1
mov dword [ebp - 0x24], edx
jbe 0x40bf5f
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add eax, edx
mov dword [ebp - 0xc], eax
add edi, edx
jmp 0x40bf57
cmp edi, eax
jae 0x40bf5f
cmp word [ebx], si
je 0x40bf5f
test ecx, ecx
je 0x40bf5f
movzx eax, word [ebx]
test ax, ax
je 0x40bef7
push eax
call dword [sym.imp.ntdll.dll_iswspace]
pop ecx
mov ecx, dword [ebp - 4]
test eax, eax
je 0x40bef7
add ebx, 2
dec ecx
sub ecx, 1
mov dword [ebp - 4], ecx
jne 0x40bed4
mov edx, dword [ebp - 0x10]
test ecx, ecx
je 0x40bf5f
cmp word [ebx], si
je 0x40bf54
mov dword [edx], edi
add edx, 4
inc dword [ebp - 0x1c]
mov dword [ebp - 0x10], edx
mov ax, word [ebx]
add ebx, 2
mov word [edi], ax
add edi, 2
dec ecx
sub ecx, 1
mov dword [ebp - 4], ecx
je 0x40bf3a
cmp edi, dword [ebp - 0xc]
jae 0x40bf49
movzx eax, word [ebx]
push eax
call dword [sym.imp.ntdll.dll_iswspace]
pop ecx
mov ecx, dword [ebp - 4]
test eax, eax
je 0x40bf0e
cmp edi, dword [ebp - 0xc]
jae 0x40bf49
xor eax, eax
mov word [edi], ax
add edi, 2
jmp 0x40bf51
sub edi, 2
xor eax, eax
mov word [edi], ax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test ecx, ecx
jne 0x40bebb
mov ecx, dword [ebp - 0x14]
lea ebx, [edx + 4]
mov dword [edx], esi
mov edx, ebx
mov ecx, dword [ecx + 0x48]
test ecx, ecx
je 0x40bf8a
jmp 0x40bf85
mov dword [edx], ecx
add edx, 4
add ecx, 2
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bf7a
cmp word [ecx], si
jne 0x40bf72
mov dword [edx], esi
jmp 0x40be6f