Function at 0x401560
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, 0x8c
mov eax, dword [eax + 8]
mov edx, dword [edx + 0x6c]
mov ecx, dword [edi + 0x70]
cmp dword [eax + 0xc], edx
jne 0x401583
cmp dword [eax + 0x10], ecx
je 0x401593
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 + 0x90]
mov dword [ebx + 0x9c], eax
mov eax, dword [edi + 0x5c]
mov dword [ebx + 0x98], eax
mov esi, dword [edi + 0x58]
test esi, esi
je 0x4015d5
cmp edx, esi
jne 0x401798
mov edx, dword [ebx + 4]
mov ecx, dword [edi + 0x60]
mov eax, edx
and eax, 0xffffffdf
test ecx, ecx
je 0x4015e8
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 0x401878
mov ecx, dword [edi + 0x44]
mov edx, dword [edi + 0x88]
mov dword [ebp - 0x7c], ecx
movsx ecx, word [eax + 0x86]
mov dword [ebp - 0x80], edx
mov edx, dword [sym.imp.ucrtbase.dll_wcslen]
cmp ecx, dword [ebp - 0x7c]
je 0x401898
mov dword [esp], esi
call edx
mov ecx, dword [ebp - 0x7c]
mov edx, 0x3e
mov dword [ebp - 0x70], 0
add eax, eax
mov dword [ebp - 0x6c], 0
cmp eax, 0x3e
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebp - 0x80]
cmova eax, edx
mov dword [ebp - 0x68], 0
lea edx, [ebp - 0x58]
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x60], 0x1000000
mov dword [ebp - 0x5c], 0x1000000
cmp eax, 4
jae 0x401780
test eax, eax
je 0x40174b
movzx ecx, byte [edi + 0x8c]
mov byte [edx], cl
test al, 2
jne 0x401900
shr eax, 1
xor edx, edx
mov word [ebp + eax*2 - 0x58], dx
lea edx, [ebp - 0x74]
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, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esi + eax - 4]
mov edi, edx
mov dword [ebp + eax - 0x5c], ecx
lea ecx, [eax - 1]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x40174b
lea eax, [esi*4]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebp - 0x7c], edx
call sym._calloc
mov dword [ebp - 0x80], eax
test eax, eax
je 0x4015d5
mov ecx, dword [ebx + 0x94]
mov edx, dword [ebp - 0x7c]
cmp esi, ecx
jb 0x4018f0
mov dword [ebp - 0x7c], 0
xor eax, eax
cmp ecx, dword [ebp - 0x7c]
jbe 0x401817
mov ecx, dword [ebp - 0x80]
lea edx, [eax*4]
sub ecx, edx
mov edx, dword [ebp - 0x7c]
mov esi, ecx
lea esi, [esi]
mov ecx, dword [ebx + 0x8c]
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 + 0x94]
mov edx, eax
cmp ecx, eax
ja 0x4017f0
mov edx, dword [ebx + 0x90]
sub ecx, dword [ebp - 0x7c]
xor esi, esi
mov dword [ebx + 0x94], ecx
test edx, edx
je 0x40184b
lea esi, [esi]
lea esi, [esi]
mov eax, dword [ebx + 0x8c]
mov eax, dword [eax + esi*4]
inc esi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
cmp dword [ebx + 0x90], esi
ja 0x401830
mov eax, dword [ebx + 0x8c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x80]
mov dword [ebx + 0x8c], eax
mov eax, dword [edi + 0x58]
mov dword [ebx + 0x90], eax
jmp 0x4015d5
mov eax, dword [edi + 0x88]
mov edx, dword [sym.imp.ucrtbase.dll_wcslen]
mov dword [ebp - 0x80], eax
mov eax, dword [edi + 0x44]
mov dword [ebp - 0x7c], eax
jmp 0x4016ed
movsx ecx, word [eax + 0x88]
cmp ecx, dword [ebp - 0x80]
jne 0x4016ed
movsx ecx, word [eax + 0x8a]
cmp ecx, dword [edi + 0x84]
jne 0x4016ed
mov eax, dword [eax + 0x90]
mov dword [ebp - 0x80], edx
mov dword [esp], esi
mov dword [ebp - 0x7c], eax
call edx
cmp dword [ebp - 0x7c], eax
mov edx, dword [ebp - 0x80]
je 0x40190f
mov eax, dword [edi + 0x88]
mov dword [ebp - 0x80], eax
mov eax, dword [edi + 0x44]
mov dword [ebp - 0x7c], eax
jmp 0x4016ed
mov eax, ecx
sub eax, esi
mov dword [ebp - 0x7c], eax
jmp 0x4017d7
movzx ecx, word [esi + eax - 2]
mov word [edx + eax - 2], cx
jmp 0x40174b
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x7c], 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 - 0x7c]
test eax, eax
jne 0x4018d4
jmp 0x40175e