Function at 0x413540
Capabilities:
Terminate process

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x194
mov eax, dword [esp + 0x1a8]
mov ebx, dword [eax + 0x18]
xorps xmm0, xmm0
movups xmmword [esp + 0x184], xmm0
movups xmmword [esp + 0x174], xmm0
movups xmmword [esp + 0x164], xmm0
movups xmmword [esp + 0x154], xmm0
movups xmmword [esp + 0x144], xmm0
movups xmmword [esp + 0x134], xmm0
movups xmmword [esp + 0x124], xmm0
movups xmmword [esp + 0x114], xmm0
movups xmmword [esp + 0x104], xmm0
movups xmmword [esp + 0xf4], xmm0
movups xmmword [esp + 0xe4], xmm0
movups xmmword [esp + 0xd4], xmm0
movups xmmword [esp + 0xc4], xmm0
movups xmmword [esp + 0xb4], xmm0
movups xmmword [esp + 0xa4], xmm0
movups xmmword [esp + 0x94], xmm0
mov ecx, 1
xor eax, eax
lock cmpxchg dword [ebx + 0x28], ecx
jne 0x413889
mov dword [ebx + 0x2c], str.chardev_term.c_191
mov ecx, 1
xor eax, eax
lock cmpxchg dword [ebx + 0x20], ecx
jne 0x4138a8
mov dword [ebx + 0x24], str.chardev_term.c_192
mov eax, dword [ebx + 0x40]
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
sub eax, ecx
cmp eax, 0x100
mov ecx, 0x100
cmovb ecx, eax
mov dword [esp + 8], ecx
mov edi, dword [ebx + 0x58]
mov ecx, dword [ebx + 0x54]
mov eax, ecx
sub eax, edi
jae 0x413641
mov ebp, dword [ebx + 0x50]
sub ecx, edi
add ecx, ebp
mov eax, ecx
jmp 0x413644
mov ebp, dword [ebx + 0x50]
cmp edi, 0x100
mov esi, 0x100
cmovb esi, edi
sub ebp, eax
cmp ebp, esi
mov ecx, esi
cmovb ecx, ebp
mov edx, dword [ebx + 0x4c]
mov dword [esp], edx
add eax, edx
lea edx, [esp + 0x94]
push ecx
push eax
push edx
call sub.MSVCR70.dll_memcpy
add esp, 0xc
mov eax, esi
sub eax, ebp
jbe 0x413690
lea ecx, [esp + ebp + 0x94]
push eax
push dword [esp + 4]
push ecx
call sub.MSVCR70.dll_memcpy
add esp, 0xc
xor ebp, ebp
xor edx, edx
xchg dword [ebx + 0x20], edx
cmp edx, 1
jne 0x4138ba
test edi, edi
je 0x4136cf
mov dword [esp + 0x14], 0
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [esp + 0x14]
push 0
push ecx
push esi
lea ecx, [esp + 0xa0]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
mov ebp, dword [esp + 0x14]
xor edi, edi
mov eax, dword [esp + 0xc]
cmp dword [esp + 0x10], eax
je 0x4137b8
call dword [sym.imp.MSVCR70.dll__kbhit]
test eax, eax
je 0x4137b8
xorps xmm0, xmm0
movups xmmword [esp + 0x84], xmm0
movups xmmword [esp + 0x74], xmm0
movups xmmword [esp + 0x64], xmm0
movups xmmword [esp + 0x54], xmm0
movups xmmword [esp + 0x44], xmm0
movups xmmword [esp + 0x34], xmm0
movups xmmword [esp + 0x24], xmm0
mov ecx, 0xaaaaaaab
mov esi, dword [esp + 8]
mov eax, esi
mul ecx
mov edi, edx
movups xmmword [esp + 0x14], xmm0
shr edi, 2
mov dword [esp + 4], 0
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
lea ecx, [esp + 4]
lea edx, [esp + 0x14]
push 0
push ecx
push edi
push edx
mov edi, edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadConsoleW]
push 0
push 0
push esi
lea eax, [esp + 0xa0]
push eax
push dword [esp + 0x14]
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test eax, eax
je 0x4137b8
cmp byte [ebx + 0x5c], 0
setne cl
xor eax, eax
jmp 0x41379f
cmp dl, 1
sete byte [ebx + 0x5c]
sete cl
inc eax
cmp edi, eax
je 0x4137b8
movzx edx, byte [esp + eax + 0x94]
test cl, 1
je 0x413790
cmp dl, 0x78
jne 0x413790
push 0
call sub.MSVCR70.dll_exit
mov ecx, 1
xor eax, eax
lock cmpxchg dword [ebx + 0x20], ecx
mov dword [esp], ebp
jne 0x4138cf
mov dword [ebx + 0x24], str.chardev_term.c_200
mov esi, dword [ebx + 0x40]
mov ebp, esi
sub ebp, dword [ebx + 0x48]
cmp ebp, edi
cmovae ebp, edi
mov eax, dword [ebx + 0x44]
sub esi, eax
cmp esi, ebp
mov ecx, ebp
cmovb ecx, esi
add eax, dword [ebx + 0x3c]
push ecx
lea ecx, [esp + 0x98]
push ecx
push eax
call sub.MSVCR70.dll_memcpy
add esp, 0xc
mov edi, ebp
sub edi, esi
jbe 0x41381e
lea eax, [esp + esi + 0x94]
push edi
push eax
push dword [ebx + 0x3c]
call sub.MSVCR70.dll_memcpy
add esp, 0xc
jmp 0x413823
mov edi, dword [ebx + 0x44]
add edi, ebp
mov dword [ebx + 0x44], edi
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x58]
xor esi, esi
sub edx, dword [esp]
cmovb edx, esi
xor eax, eax
add dword [ebx + 0x48], ebp
mov dword [ebx + 0x58], edx
setne al
lea edi, [eax + 2]
cmp ecx, edx
cmove edi, eax
mov ebp, edi
xchg dword [ebx + 0x30], ebp
not ebp
xor edx, edx
xchg dword [ebx + 0x20], edx
cmp edx, 1
jne 0x4138e1
and edi, ebp
xchg dword [ebx + 0x28], esi
cmp esi, 1
jne 0x4138f7
test edi, edi
je 0x41387e
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x41387e
push edi
push dword [ebx + 0x1c]
call eax
add esp, 8
add esp, 0x194
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [ebx + 0x28]
mov edx, str.chardev_term.c_191
call fcn.0040f5ee
mov ecx, 1
xor eax, eax
lock cmpxchg dword [ebx + 0x20], ecx
je 0x413602
lea ecx, [ebx + 0x20]
mov edx, str.chardev_term.c_192
call fcn.0040f5ee
jmp 0x413609
lea ecx, [ebx + 0x20]
call fcn.0040f821
test edi, edi
jne 0x4136a4
jmp 0x4136cf
lea ecx, [ebx + 0x20]
mov edx, str.chardev_term.c_200
call fcn.0040f5ee
jmp 0x4137d4
lea ecx, [ebx + 0x20]
call fcn.0040f821
and edi, ebp
xchg dword [ebx + 0x28], esi
cmp esi, 1
je 0x41386a
lea ecx, [ebx + 0x28]
mov edx, esi
call fcn.0040f821
test edi, edi
jne 0x41386e
jmp 0x41387e