Function at 0x4010a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x4016a0
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, 0x403178
call fcn.00401450
add esp, 4
mov ecx, 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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ebx, 0x64
lea esi, [ebx - 0x5a]
nop dword [eax]
mov eax, 0xcccccccd
mov edi, ebx
mul ebx
shr edx, 3
mov eax, edx
lea ecx, [edx + edx*4]
cdq
idiv esi
add ecx, ecx
mov eax, 0x51eb851f
sub edi, ecx
mov ecx, edx
mul ebx
mov eax, ecx
shr edx, 5
imul eax, ecx
mov esi, edx
imul esi, edx
imul eax, ecx
imul esi, edx
add esi, eax
mov eax, edi
imul eax, edi
imul eax, edi
add esi, eax
cmp esi, ebx
jne 0x40114e
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x4016a0
push ebx
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__::operator___int_]
push ecx
mov edx, 0x403198
mov ecx, eax
call fcn.00401450
add esp, 4
mov ecx, 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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
inc ebx
mov esi, 0xa
cmp ebx, 0x3e8
jl 0x4010e0
lea edi, [esi - 5]
nop
mov esi, 0xa
nop word [eax + eax]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x4016a0
push 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__::operator___int_]
mov ecx, 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__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
inc esi
cmp esi, 0xc
jl 0x401170
sub edi, 1
jne 0x401160
push 0x4031a4
lea eax, [ebp - 0xc]
push str.code.txt
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add esp, 0xc
test eax, eax
je 0x4011cf
push eax
push str.Error_opening_file:__d._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401020
add esp, 0xc
jmp 0x40136d
push 2
push 0
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
add esp, 4
mov esi, eax
mov dword [ebp - 0x18], esi
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
mov eax, esi
add esp, 4
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
mov dword [ebp - 0x1c], ebx
mov edi, dword [ebp - 0x18]
inc edi
mov ecx, 1
push ecx
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x40124d
push str.Failed_to_allocate_memory_for_hexBuffer._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401020
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0xc
jmp 0x40136d
push dword [ebp - 0xc]
push esi
push 1
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread_s]
add esp, 0x14
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x4012ab
push str.Failed_to_allocate_memory_for_execBuffer._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401020
add esp, 8
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x40136d
xor esi, esi
test ebx, ebx
je 0x4012d2
add eax, esi
push eax
mov eax, dword [ebp - 0x14]
push str._2hhx
lea eax, [eax + esi*2]
push eax
call fcn.00401050
inc esi
add esp, 0xc
cmp esi, ebx
jae 0x4012d2
mov eax, dword [ebp - 0x10]
jmp 0x4012b1
call fcn.00401080
test eax, eax
je 0x401354
push str.VirtualProtect
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401354
lea ecx, [ebp - 8]
push ecx
push 0x40
push ebx
push dword [ebp - 0x10]
call eax
test eax, eax
jne 0x401302
push str.Failed_to_change_memory_protection._n
jmp 0x401359
push 0
push 0
push 0
push dword [ebp - 0x10]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x401320
push str.Failed_to_spawn_thread._n
jmp 0x401359
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004016cf
mov esp, ebp
pop ebp
ret
push str.Failed_to_get_the_address_of_VirtualProtect._n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401020
add esp, 8
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004016cf
mov esp, ebp
pop ebp
ret