Function at 0x404780
Capabilities:
Terminate process

Disassembly:
sub esp, 0x928
mov eax, dword [esp + 0x934]
push ebx
push ebp
mov ebp, dword [esp + 0x934]
push esi
push edi
test eax, eax
mov dword [esp + 0x14], 0
jle 0x4047b2
test ebp, ebp
je 0x404b2a
mov byte [ebp], 0
jmp 0x4047d4
test ebp, ebp
je 0x4047bc
cmp byte [ebp], 0
jne 0x4047d4
mov eax, dword [esp + 0x940]
test eax, eax
je 0x404b2a
cmp dword [eax], 0
je 0x404b2a
push 0x40d354
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x28], ebx
je 0x404ae1
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40d344
push ebx
call esi
push 0x40d330
push ebx
mov edi, eax
call esi
push 0x40d318
push ebx
mov dword [esp + 0x28], eax
call esi
mov esi, eax
test edi, edi
mov dword [esp + 0x24], esi
je 0x404ada
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404ada
test esi, esi
je 0x404ada
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x138]
push eax
push 0x800
push ecx
call edi
test eax, eax
je 0x404ada
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x404ada
shr eax, 2
test eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
jle 0x404ada
lea edi, [esp + 0x138]
mov dword [esp + 0x10], edi
jmp 0x404883
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x944]
test eax, eax
jge 0x40489a
mov edx, dword [edi]
push edx
push 0
push 0x1f0fff
jmp 0x4048a4
mov eax, dword [edi]
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x404aaf
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x30]
push ecx
push 4
push edx
push ebx
call dword [esp + 0x30]
test eax, eax
je 0x404aaf
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x404aaf
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push 0x104
push eax
push ecx
push ebx
call esi
test eax, eax
je 0x404aaf
mov esi, dword [esp + 0x944]
test esi, esi
jle 0x40495a
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x34]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 0xc]
cmp eax, esi
jge 0x404aaf
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x34]
push ecx
mov edi, ebp
mov eax, dword [edx]
or ecx, 0xffffffff
push eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0x40d30c
add ecx, ebp
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
mov dword [esp + 0x14], 1
jmp 0x404aaf
test ebp, ebp
je 0x404a4e
cmp byte [ebp], 0
je 0x404a4e
mov esi, dword [sym.imp.MSVCRT.dll_strrchr]
lea ecx, [esp + 0x34]
push 0x5c
push ecx
call esi
add esp, 8
test eax, eax
je 0x404993
lea edx, [esp + 0x34]
push 0x5c
push edx
call esi
mov esi, eax
add esp, 8
inc esi
jmp 0x404997
lea esi, [esp + 0x34]
mov edi, dword [sym.imp.MSVCRT.dll_strchr]
push 0x5c
push ebp
call edi
add esp, 8
test eax, eax
je 0x4049c1
push 1
push 0
push 0
lea eax, [esp + 0x40]
push ebp
push eax
call fcn.004024d0
add esp, 0x14
test eax, eax
jne 0x4049e7
push 0x5c
push ebp
call edi
add esp, 8
test eax, eax
jne 0x404aaf
push 1
push eax
push eax
push ebp
push esi
call fcn.004024d0
add esp, 0x14
test eax, eax
je 0x404aaf
mov edx, dword [esp + 0x948]
test edx, edx
je 0x404a13
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x944]
test eax, eax
je 0x404af0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x10]
cmp eax, dword [ecx]
je 0x404aaf
push 1
push 0
push 0
lea edx, [esp + 0x40]
push 0x40d300
push edx
call fcn.004024d0
add esp, 0x14
test eax, eax
jne 0x404aaf
jmp 0x404aa2
mov eax, dword [esp + 0x940]
mov ecx, dword [eax]
mov eax, dword [edi]
cmp ecx, eax
jne 0x404aaf
mov edx, dword [esp + 0x948]
test edx, edx
je 0x404a90
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x944]
test esi, esi
je 0x404b0d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x10]
cmp eax, dword [ecx]
je 0x404aaf
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [esp + 0x14], eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
inc eax
add edi, 4
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edi
jl 0x40487f
mov ebx, dword [esp + 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x928
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov eax, dword [esp + edx*4 + 0x12c]
pop ebx
add esp, 0x928
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov eax, dword [esp + eax*4 + 0x12c]
pop ebx
add esp, 0x928
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x928
ret