Function at 0x401540
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
sub esp, 0x70
mov eax, dword [eax + 8]
mov edx, dword [edx + 0x6c]
mov ecx, dword [edi + 0x70]
cmp dword [eax + 0xc], edx
jne 0x401560
cmp dword [eax + 0x10], ecx
je 0x401570
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._change_screen_buffer_size
mov edx, dword [edi + 0x64]
mov eax, dword [ebx + 0x84]
mov dword [eax + 0x30], edx
mov edx, dword [edi + 0x68]
mov eax, dword [ebx + 0x84]
mov dword [eax + 0x2c], edx
mov eax, dword [edi + 0x80]
mov edx, dword [ebx + 0x94]
mov dword [ebx + 0xa0], eax
mov eax, dword [edi + 0x5c]
mov dword [ebx + 0x9c], eax
mov esi, dword [edi + 0x58]
test esi, esi
je 0x4015b2
cmp edx, esi
jne 0x401780
mov edx, dword [ebx + 4]
mov esi, dword [edi + 0x60]
mov eax, edx
and eax, 0xffffffdf
test esi, esi
je 0x4015c5
mov eax, edx
or al, 0xa0
mov dword [ebx + 4], eax
mov eax, dword [ebx + 8]
lea esi, [edi + 0x8c]
mov edx, dword [edi + 0x48]
mov dword [eax + 0x14], edx
mov eax, dword [ebx + 8]
mov edx, dword [edi + 0x4c]
mov dword [eax + 0x18], edx
mov eax, dword [ebx + 8]
mov edx, dword [edi + 0x50]
mov word [eax + 0x24], dx
mov eax, dword [ebx + 8]
mov edx, dword [edi + 0x54]
mov word [eax + 0x26], dx
mov eax, dword [ebx + 8]
movsx edx, word [edi + 0x7c]
mov dword [eax + 0x74], edx
mov eax, dword [ebx + 8]
movsx edx, word [edi + 0x7e]
mov dword [eax + 0x78], edx
mov ecx, dword [edi + 0x74]
movsx edx, word [edi + 0x7c]
mov eax, dword [ebx + 8]
lea edx, [ecx + edx - 1]
mov dword [eax + 0x7c], edx
mov ecx, dword [edi + 0x78]
movsx edx, word [edi + 0x7e]
mov eax, dword [ebx + 8]
lea edx, [ecx + edx - 1]
mov dword [eax + 0x80], edx
mov edx, dword [ebx + 8]
mov ecx, dword [edi]
lea eax, [edx + 0x34]
mov dword [edx + 0x34], ecx
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
mov edx, dword [edi + 8]
mov dword [eax + 8], edx
mov edx, dword [edi + 0xc]
mov dword [eax + 0xc], edx
mov edx, dword [edi + 0x10]
mov dword [eax + 0x10], edx
mov edx, dword [edi + 0x14]
mov dword [eax + 0x14], edx
mov edx, dword [edi + 0x18]
mov dword [eax + 0x18], edx
mov edx, dword [edi + 0x1c]
mov dword [eax + 0x1c], edx
mov edx, dword [edi + 0x20]
mov dword [eax + 0x20], edx
mov edx, dword [edi + 0x24]
mov dword [eax + 0x24], edx
mov edx, dword [edi + 0x28]
mov dword [eax + 0x28], edx
mov edx, dword [edi + 0x2c]
mov dword [eax + 0x2c], edx
mov edx, dword [edi + 0x30]
mov dword [eax + 0x30], edx
mov edx, dword [edi + 0x34]
mov dword [eax + 0x34], edx
mov edx, dword [edi + 0x38]
mov dword [eax + 0x38], edx
mov edx, dword [edi + 0x3c]
mov dword [eax + 0x3c], edx
mov eax, dword [ebx + 8]
movsx edx, word [eax + 0x84]
cmp edx, dword [edi + 0x40]
jne 0x401858
mov ecx, dword [edi + 0x44]
mov edx, dword [edi + 0x88]
mov dword [ebp - 0x6c], ecx
movsx ecx, word [eax + 0x86]
mov dword [ebp - 0x70], edx
mov edx, dword [sym.imp.ucrtbase.dll_wcslen]
cmp ecx, dword [ebp - 0x6c]
je 0x401878
mov dword [esp], esi
call edx
mov ecx, dword [ebx + 0x84]
test ecx, ecx
je 0x401742
mov ecx, dword [ebp - 0x6c]
add eax, eax
mov edx, 0x3e
mov dword [ebp - 0x64], 0
cmp eax, 0x3e
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x68], ecx
cmova eax, edx
mov ecx, dword [ebp - 0x70]
lea edx, [ebp - 0x4c]
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], 0x1000000
mov dword [ebp - 0x50], 0x1000000
cmp eax, 4
jb 0x401760
mov ecx, dword [esi + eax - 4]
mov edi, edx
mov dword [ebp + eax - 0x50], ecx
lea ecx, [eax - 1]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
shr eax, 1
xor edx, edx
mov word [ebp + eax*2 - 0x4c], dx
lea edx, [ebp - 0x68]
mov eax, ebx
call sym._set_console_font
mov eax, ebx
call sym._update_window
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym._notify_screen_buffer_size
add esp, 0x70
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
je 0x40172f
movzx ecx, byte [edi + 0x8c]
mov byte [edx], cl
test al, 2
je 0x40172f
movzx ecx, word [esi + eax - 2]
mov word [edx + eax - 2], cx
jmp 0x40172f
lea eax, [esi*4]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebp - 0x6c], edx
call sym._calloc
mov dword [ebp - 0x70], eax
test eax, eax
je 0x4015b2
mov ecx, dword [ebx + 0x98]
mov edx, dword [ebp - 0x6c]
cmp esi, ecx
jb 0x4018d0
mov dword [ebp - 0x6c], 0
xor eax, eax
cmp ecx, dword [ebp - 0x6c]
jbe 0x4017ff
mov ecx, dword [ebp - 0x70]
lea edx, [eax*4]
sub ecx, edx
mov edx, dword [ebp - 0x6c]
mov esi, ecx
lea esi, [esi]
mov ecx, dword [ebx + 0x90]
lea edx, [ecx + edx*4]
mov ecx, dword [edx]
mov dword [esi + eax*4], ecx
inc eax
mov dword [edx], 0
mov ecx, dword [ebx + 0x98]
mov edx, eax
cmp ecx, eax
ja 0x4017d8
mov edx, dword [ebx + 0x94]
sub ecx, dword [ebp - 0x6c]
xor esi, esi
mov dword [ebx + 0x98], ecx
test edx, edx
je 0x40182b
nop
mov eax, dword [ebx + 0x90]
mov eax, dword [eax + esi*4]
inc esi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
cmp dword [ebx + 0x94], esi
ja 0x401810
mov eax, dword [ebx + 0x90]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x70]
mov dword [ebx + 0x90], eax
mov eax, dword [edi + 0x58]
mov dword [ebx + 0x94], eax
jmp 0x4015b2
mov eax, dword [edi + 0x88]
mov edx, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [ebp - 0x70], eax
mov eax, dword [edi + 0x44]
mov dword [ebp - 0x6c], eax
jmp 0x4016ca
movsx ecx, word [eax + 0x88]
cmp ecx, dword [ebp - 0x70]
jne 0x4016ca
movsx ecx, word [eax + 0x8a]
cmp ecx, dword [edi + 0x84]
jne 0x4016ca
mov eax, dword [eax + 0x90]
mov dword [ebp - 0x70], edx
mov dword [esp], esi
mov dword [ebp - 0x6c], eax
call edx
cmp dword [ebp - 0x6c], eax
mov edx, dword [ebp - 0x70]
je 0x4018dc
mov eax, dword [edi + 0x88]
mov dword [ebp - 0x70], eax
mov eax, dword [edi + 0x44]
mov dword [ebp - 0x6c], eax
jmp 0x4016ca
mov eax, ecx
sub eax, esi
mov dword [ebp - 0x6c], eax
jmp 0x4017bf
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x6c], edx
mov eax, dword [ecx + 0x90]
mov dword [esp + 4], esi
add eax, eax
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x8c]
mov dword [esp], eax
call sym._memcmp
mov edx, dword [ebp - 0x6c]
test eax, eax
jne 0x4018b4
jmp 0x401742