Function at 0x401060
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
stmxcsr dword [ebp - 0x34]
or dword [ebp - 0x34], 0x8040
ldmxcsr dword [ebp - 0x34]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x401520
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
push str.calc
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 4
mov eax, dword [0x404478]
mov ecx, dword [0x4040dc]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4013b8
movzx eax, byte [0x404470]
movd xmm0, dword [0x404471]
movd xmm1, eax
punpcklbw xmm1, xmm1
pshuflw xmm1, xmm1, 0
pxor xmm1, xmm0
movd dword [0x404471], xmm1
xor byte [0x404475], al
xor byte [0x404476], al
mov byte [0x404477], 0
push 0x404471
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
mov edi, dword [esi + ecx + 0x20]
mov edx, edi
neg edx
mov ebx, dword [esi + ecx + 0x24]
mov edx, 0
sbb edx, ebx
setl byte [ebp - 0x2c]
cmp eax, edi
mov edx, 0
sbb edx, ebx
setb dl
mov dword [ebp - 0x20], eax
sub edi, eax
sbb ebx, 0
test byte [ebp - 0x2c], dl
mov eax, 0
mov dword [ebp - 0x30], ebx
cmovne eax, ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], edi
mov eax, 0
cmovne eax, edi
mov edi, eax
mov eax, dword [esi + ecx + 0x38]
test eax, eax
je 0x40117b
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 4]
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::good_void_const]
mov ebx, 4
test al, al
je 0x40131c
mov eax, dword [esi]
mov ecx, dword [eax + 4]
mov ecx, dword [esi + ecx + 0x3c]
test ecx, ecx
je 0x4011e6
cmp ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, dword [ebp - 0x20]
je 0x4011e9
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x10], 0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::flush_void_]
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::good_void_const]
test al, al
mov ebx, 4
je 0x40131c
mov eax, dword [esi]
mov edx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
jmp 0x4011e9
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + 4]
mov ecx, 0x1c0
and ecx, dword [esi + eax + 0x14]
cmp ecx, 0x40
je 0x40126b
cmp edi, 1
mov ecx, dword [ebp - 0x28]
sbb ecx, 0
jl 0x40126b
mov dword [ebp - 0x10], 3
nop dword [eax]
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov ecx, dword [esi + eax + 0x38]
movsx eax, byte [esi + eax + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::sputc_char_]
cmp eax, 0xffffffff
je 0x4012fc
mov edx, dword [ebp - 0x2c]
mov eax, edx
add eax, 0xffffffff
mov esi, dword [ebp - 0x30]
mov ecx, esi
adc ecx, 0xffffffff
mov edi, 1
cmp edi, edx
mov edx, 0
sbb edx, esi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ecx
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jl 0x401210
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
mov dword [ebp - 0x28], 0
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x24], edi
mov ecx, dword [esi + eax + 0x38]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x10], 3
push 0
push edx
push 0x404471
call eax
xor eax, dword [ebp - 0x20]
or eax, edx
mov edx, dword [ebp - 0x24]
jne 0x4012fc
cmp edx, 1
mov eax, dword [ebp - 0x28]
sbb eax, 0
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jl 0x4013b1
nop word [eax + eax]
mov dword [ebp - 0x24], edx
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov ecx, dword [esi + eax + 0x38]
movsx eax, byte [esi + eax + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::sputc_char_]
cmp eax, 0xffffffff
mov edx, dword [ebp - 0x24]
je 0x4012fc
mov eax, edx
add eax, 0xffffffff
mov esi, dword [ebp - 0x28]
mov ecx, esi
adc ecx, 0xffffffff
xor ebx, ebx
mov edi, 1
cmp edi, edx
mov edx, 0
sbb edx, esi
mov edx, eax
mov dword [ebp - 0x28], ecx
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jl 0x4012b0
jmp 0x401307
mov ebx, 4
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov dword [esi + eax + 0x24], 0
mov dword [esi + eax + 0x20], 0
mov eax, dword [esi]
mov eax, dword [eax + 4]
lea ecx, [esi + eax]
or ebx, dword [esi + eax + 0xc]
mov dword [ebp - 0x10], 2
push 0
push ebx
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
call sub.MSVCP140.dll_bool___cdecl_std::uncaught_exception_void_
test al, al
jne 0x40134d
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::_Osfx_void_]
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov eax, dword [esi]
mov ecx, dword [eax + 4]
mov ecx, dword [esi + ecx + 0x38]
test ecx, ecx
je 0x401376
mov eax, dword [ecx]
mov eax, dword [eax + 8]
mov dword [ebp - 0x10], 1
call eax
mov esi, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
mov dword [ebp - 0x10], 0xffffffff
push 0xa
call dword [sym.imp.MSVCP140.dll_public:_char___thiscall_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const]
movsx eax, al
mov ecx, esi
push eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::put_char_]
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::flush_void_]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
xor eax, eax
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
jmp 0x401307
push 0x404478
call fcn.0040152a
add esp, 4
cmp dword [0x404478], 0xffffffff
jne 0x4010cb
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov ecx, eax
mov edx, 0xcb8727c1
imul edx
add edx, ecx
mov eax, edx
shr eax, 0x1f
shr edx, 7
add edx, eax
imul eax, edx, 0xa1
sub ecx, eax
movd xmm0, ecx
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pxor xmm0, xmmword [str.1234]
mov byte [0x404470], cl
movd dword [0x404471], xmm0
mov eax, ecx
xor al, 0x35
mov byte [0x404475], al
xor cl, 0x36
mov byte [0x404476], cl
mov byte [0x404477], 0
push 0x404478
call fcn.00401579
add esp, 4
jmp 0x4010cb