Function at 0x404c50
Capabilities:
Terminate process

Disassembly:
mov eax, 0x1110
call fcn.00407870
cmp dword [0x41b230], 0x7fffffff
push ebx
mov ebx, dword [esp + 0x1118]
jne 0x404c78
xor al, al
pop ebx
add esp, 0x1110
ret
mov eax, ebx
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404c80
sub eax, ebx
sar eax, 1
sub eax, 1
cmp eax, 4
push esi
push edi
jb 0x404cfc
mov ecx, dword [0x41b270]
mov esi, ebx
mov edi, 4
sub esi, ecx
jmp 0x404cb0
movzx eax, word [esi + ecx]
cmp ax, 0x41
jb 0x404cc3
cmp ax, 0x5a
ja 0x404cc3
add eax, 0x20
movzx edx, ax
movzx eax, word [ecx]
cmp ax, 0x41
jb 0x404cd8
cmp ax, 0x5a
ja 0x404cd8
add eax, 0x20
add ecx, 2
sub edi, 1
movzx eax, ax
je 0x404ce8
cmp dx, ax
je 0x404cb0
movzx eax, ax
movzx ecx, dx
sub ecx, eax
jne 0x404cfc
add ebx, 8
mov dword [esp + 0x1120], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebp
mov esi, 0x100000
push esi
push 0
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
push 0
mov ebp, eax
push esi
push ebp
push 0x10
mov dword [esp + 0x24], ebp
call dword [0x41b290]
cmp eax, 0xc0000004
jne 0x404d7b
nop
push ebp
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
add esi, 0x100000
cmp esi, 0x10000000
jg 0x405056
test esi, esi
je 0x404d62
push esi
push 0
call ebx
push eax
call edi
mov ebp, eax
mov dword [esp + 0x14], eax
jmp 0x404d68
xor ebp, ebp
mov dword [esp + 0x14], ebp
push 0
push esi
push ebp
push 0x10
call dword [0x41b290]
cmp eax, 0xc0000004
je 0x404d30
test eax, eax
jge 0x404d98
push ebp
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop ebp
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1110
ret
push esi
call fcn.004065c0
add esp, 4
cmp dword [0x41b2a0], 0
mov dword [esp + 0x18], 0
jne 0x404dbd
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x41b2a0], eax
mov edx, dword [0x41b230]
mov eax, dword [ebp]
push edx
push eax
call fcn.004065c0
xor ebx, ebx
add esp, 8
cmp dword [ebp], ebx
jbe 0x404f60
mov ebp, dword [esp + 0x14]
add ebp, 4
jmp 0x404df0
movzx ecx, byte [ebp + 4]
cmp ecx, dword [0x41b230]
jne 0x404f4c
movzx edx, word [ebp]
cmp edx, dword [0x41b2a0]
je 0x404f4c
mov esi, dword [0x41b268]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
movzx eax, word [ebp]
cmp eax, edi
je 0x404f4c
push eax
push 0
push 0x40
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x404f4c
push 0
push 0
push 0
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
movzx ecx, word [ebp + 6]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x404f4c
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x404f45
mov eax, dword [0x41b298]
test eax, eax
je 0x404f45
mov edx, dword [esp + 0x10]
push 0
push 0x400
lea ecx, [esp + 0x928]
push ecx
push edx
call eax
test eax, eax
je 0x404f36
cmp eax, 4
lea esi, [esp + 0x920]
jb 0x404ee3
mov ecx, dword [0x41b270]
mov eax, 4
mov edx, esi
call fcn.00404030
test eax, eax
jne 0x404ee3
lea esi, [esp + 0x928]
mov edx, dword [esp + 0x1124]
mov eax, esi
call fcn.00403fe0
test eax, eax
jne 0x404f45
movzx edx, word [ebp]
movzx eax, dx
cmp eax, dword [0x41b274]
je 0x405046
mov esi, dword [esp + 0x18]
xor cl, cl
xor eax, eax
test esi, esi
jbe 0x404f28
cmp word [esp + eax*2 + 0x20], dx
jne 0x404f1d
mov cl, 1
add eax, 1
cmp eax, esi
jb 0x404f14
test cl, cl
jne 0x404f45
mov word [esp + esi*2 + 0x20], dx
add esi, 1
mov dword [esp + 0x18], esi
jmp 0x404f45
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004065c0
add esp, 4
mov ecx, dword [esp + 0x10]
push ecx
call edi
mov edx, dword [esp + 0x14]
add ebx, 1
add ebp, 0x10
cmp ebx, dword [edx]
jb 0x404df0
mov ebp, edx
xor edi, edi
cmp dword [esp + 0x18], edi
mov dword [esp + 0x1c], 0x400
mov dword [esp + 0x10], edi
jbe 0x405133
jmp 0x404f80
movzx ebx, word [esp + edi*2 + 0x20]
push ebx
call fcn.004065c0
add esp, 4
cmp dword [0x41b29c], 0
je 0x4050eb
push ebx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x4050dc
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x124]
push edx
push 0
push esi
mov dword [esp + 0x2c], 0x400
call dword [0x41b29c]
test eax, eax
jne 0x404fe4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004065c0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x120]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404ff2
mov eax, 0x419028
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x405002
sub eax, 0x419028
lea edx, [esp + 0x120]
sub ecx, edx
sar eax, 1
sar ecx, 1
sub eax, 1
sub ecx, 1
cmp ecx, eax
jae 0x405063
mov eax, edx
jmp 0x405030
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405030
lea edx, [esp + 0x120]
sub eax, edx
jmp 0x405080
mov eax, dword [esp + 0x10]
push eax
call edi
mov eax, dword [esp + 0x14]
call fcn.00404240
pop ebp
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x1110
ret
mov eax, 0x419028
jmp 0x405070
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405070
sub eax, 0x419028
sar eax, 1
sub eax, 1
test eax, eax
je 0x405126
xor edx, edx
nop
movzx ecx, word [esp + edx + 0x120]
cmp cx, 0x41
jb 0x4050a7
cmp cx, 0x5a
ja 0x4050a7
add ecx, 0x20
movzx esi, cx
movzx ecx, word [edx + 0x419028]
cmp cx, 0x41
jb 0x4050c0
cmp cx, 0x5a
ja 0x4050c0
add ecx, 0x20
add edx, 2
sub eax, 1
movzx ecx, cx
je 0x4050d0
cmp si, cx
je 0x405090
movzx edx, cx
movzx eax, si
sub eax, edx
je 0x405126
jmp 0x4050eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004065c0
add esp, 4
lea ecx, [esp + 0x120]
push ecx
push ebx
call fcn.004065c0
add esp, 8
push ebx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x405126
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x40511f
add dword [esp + 0x10], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 1
cmp edi, dword [esp + 0x18]
jb 0x404f80
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esp + 0x18]
pop ebp
xor eax, eax
cmp dword [esp + 0xc], edx
pop edi
pop esi
sete al
pop ebx
add esp, 0x1110
ret