Function at 0x4020e0
Capabilities:
Access peb ldr_data
Get ntdll base address
Get process heap flags
Get process heap force flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
push esi
xor esi, esi
push ebx
sub esp, 0x2c
mov dword [ebp - 0x24], edx
mov dword [esp + 4], eax
mov dword [esp], 0x40f1d8
call fcn.00401ad0
mov dword [esp + 4], 0x40f1f4
mov dword [ebp - 0x28], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wfopen]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4022ed
nop
test edi, edi
je 0x4022bd
xor ebx, ebx
test edi, edi
jne 0x402190
jmp 0x4022e0
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
mov dword [esp + 4], 0xa
mov dword [esp], edi
mov ebx, eax
call dword [sym.imp.ucrtbase.dll_strchr]
test eax, eax
jne 0x402250
add esi, esi
mov dword [esp + 8], edi
mov dword [esp + 0xc], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov edi, eax
test eax, eax
je 0x4022fd
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov eax, esi
sub eax, ebx
add ebx, edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_fgets]
test eax, eax
jne 0x402138
mov dword [esp + 8], edi
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_feof]
test eax, eax
setne al
movzx eax, al
mov esi, eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_fclose]
mov ecx, dword [ebp - 0x28]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, esi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov byte [eax], 0
cmp byte [edi], 0x23
je 0x402120
mov dword [esp + 4], 0x3a
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strchr]
mov ebx, eax
test eax, eax
je 0x402120
mov eax, 0x10
call fcn.00401510
mov byte [ebx], 0
mov dword [ebp - 0x20], eax
mov eax, edi
call fcn.00401580
mov edx, dword [ebp - 0x20]
mov dword [edx], eax
lea eax, [ebx + 1]
call fcn.00401580
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x24]
mov dword [edx + 4], eax
lea eax, [edx + 8]
mov dword [edx + 8], ebx
mov ecx, dword [ebx + 4]
mov dword [edx + 0xc], ecx
mov dword [ecx], eax
mov dword [ebx + 4], eax
test edi, edi
jne 0x402128
mov eax, 0x1000
mov esi, 0x1000
xor ebx, ebx
call fcn.00401510
mov edi, eax
test edi, edi
jne 0x402190
lea esi, [esi]
nop
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
xor esi, esi
jmp 0x4021ea
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov esi, 1
jmp 0x40221a
test byte [section..data], 2
jne 0x402313
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xrealloc
mov dword [esp + 4], 0x40e000
mov dword [esp], 1
call fcn.00401480
jmp 0x402306