Function at 0x4047d0
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 0x404802
test ebp, ebp
je 0x404b7a
mov byte [ebp], 0
jmp 0x404824
test ebp, ebp
je 0x40480c
cmp byte [ebp], 0
jne 0x404824
mov eax, dword [esp + 0x940]
test eax, eax
je 0x404b7a
cmp dword [eax], 0
je 0x404b7a
push 0x40d34c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x28], ebx
je 0x404b31
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40d33c
push ebx
call esi
push 0x40d328
push ebx
mov edi, eax
call esi
push 0x40d310
push ebx
mov dword [esp + 0x28], eax
call esi
mov esi, eax
test edi, edi
mov dword [esp + 0x24], esi
je 0x404b2a
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404b2a
test esi, esi
je 0x404b2a
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x138]
push eax
push 0x800
push ecx
call edi
test eax, eax
je 0x404b2a
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x404b2a
shr eax, 2
test eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
jle 0x404b2a
lea edi, [esp + 0x138]
mov dword [esp + 0x10], edi
jmp 0x4048d3
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x944]
test eax, eax
jge 0x4048ea
mov edx, dword [edi]
push edx
push 0
push 0x1f0fff
jmp 0x4048f4
mov eax, dword [edi]
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x404aff
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x30]
push ecx
push 4
push edx
push ebx
call dword [esp + 0x30]
test eax, eax
je 0x404aff
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x404aff
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push 0x104
push eax
push ecx
push ebx
call esi
test eax, eax
je 0x404aff
mov esi, dword [esp + 0x944]
test esi, esi
jle 0x4049aa
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 0x404aff
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 0x40d304
add ecx, ebp
push ecx
call dword [sym.imp.msvcrt.dll_sprintf]
add esp, 0x10
mov dword [esp + 0x14], 1
jmp 0x404aff
test ebp, ebp
je 0x404a9e
cmp byte [ebp], 0
je 0x404a9e
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 0x4049e3
lea edx, [esp + 0x34]
push 0x5c
push edx
call esi
mov esi, eax
add esp, 8
inc esi
jmp 0x4049e7
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 0x404a11
push 1
push 0
push 0
lea eax, [esp + 0x40]
push ebp
push eax
call fcn.00402500
add esp, 0x14
test eax, eax
jne 0x404a37
push 0x5c
push ebp
call edi
add esp, 8
test eax, eax
jne 0x404aff
push 1
push eax
push eax
push ebp
push esi
call fcn.00402500
add esp, 0x14
test eax, eax
je 0x404aff
mov edx, dword [esp + 0x948]
test edx, edx
je 0x404a63
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 0x404b40
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x10]
cmp eax, dword [ecx]
je 0x404aff
push 1
push 0
push 0
lea edx, [esp + 0x40]
push 0x40d2f8
push edx
call fcn.00402500
add esp, 0x14
test eax, eax
jne 0x404aff
jmp 0x404af2
mov eax, dword [esp + 0x940]
mov ecx, dword [eax]
mov eax, dword [edi]
cmp ecx, eax
jne 0x404aff
mov edx, dword [esp + 0x948]
test edx, edx
je 0x404ae0
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 0x404b5d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x10]
cmp eax, dword [ecx]
je 0x404aff
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 0x4048cf
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