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

Disassembly:
sub esp, 0x80
mov eax, dword [0x526b24]
xor eax, esp
mov dword [esp + 0x7c], eax
mov ecx, dword [esp + 0x88]
push ebx
mov ebx, dword [esp + 0x94]
mov dword [esp + 0x1c], ebx
push esi
mov esi, dword [esp + 0x8c]
push edi
mov edi, dword [esp + 0x98]
mov dword [esp + 0x10], edi
test ebx, ebx
je 0x4be1a2
mov dword [ebx], 0xffffffff
movzx eax, word [esi]
mov edx, eax
test ax, ax
jne 0x4be2ab
cmp word [ecx], ax
jne 0x4be2ab
mov edi, dword [0x62271c]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + edi*4]
cmp dword [eax + 0x1e64], 0
jne 0x4be28a
cmp dword [eax + 0x1e60], 0
jne 0x4be22c
push 0x4b00
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword fs:[0x2c]
add esp, 4
mov edx, dword [ecx + edi*4]
mov dword [edx + 0x1e60], eax
test eax, eax
jne 0x4be22c
cmp byte [edx + 0x2198], al
jne 0x4be214
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + edi*4]
push 0x4f5b70
push str.Out_of_memory.
mov ecx, dword [ecx + 0x298]
call fcn.00454380
push 0x11
call dword [sym.imp.GDI32.dll_GetStockObject]
mov ecx, dword fs:[0x2c]
mov esi, dword [ecx + edi*4]
mov ecx, dword [esi + 0x1e64]
lea edx, [ecx + ecx*2]
mov ecx, dword [esi + 0x1e60]
shl edx, 5
mov dword [edx + ecx + 0x5c], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [eax + edi*4]
mov eax, dword [ecx + 0x1e64]
lea eax, [eax + eax*2]
shl eax, 5
add eax, dword [ecx + 0x1e60]
push eax
push 0x5c
push dword [eax + 0x5c]
call dword [sym.imp.GDI32.dll_GetObjectW]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + edi*4]
inc dword [eax + 0x1e64]
test ebx, ebx
je 0x4be294
mov dword [ebx], 0xff000000
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.004ebadf
add esp, 0x80
ret
test edi, edi
jne 0x4be2d5
mov eax, dword fs:[0x2c]
mov edi, dword [0x62271c]
mov eax, dword [eax + edi*4]
cmp dword [eax + 0x1e64], 0
jle 0x4be3d4
mov edi, dword [eax + 0x1e60]
mov dword [esp + 0x10], edi
cmp word [ecx], 0
mov eax, edx
movups xmm0, xmmword [edi]
movups xmmword [esp + 0x28], xmm0
movups xmm0, xmmword [edi + 0x10]
movups xmmword [esp + 0x38], xmm0
movups xmm0, xmmword [edi + 0x20]
movups xmmword [esp + 0x48], xmm0
movups xmm0, xmmword [edi + 0x30]
movups xmmword [esp + 0x58], xmm0
movups xmm0, xmmword [edi + 0x40]
movups xmmword [esp + 0x68], xmm0
movups xmm0, xmmword [edi + 0x50]
movups xmmword [esp + 0x78], xmm0
je 0x4be325
push 0x20
push ecx
lea eax, [esp + 0x4c]
push eax
call fcn.004e6a80
movzx eax, word [esi]
add esp, 0xc
or edx, 0xffffffff
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], edx
push ebp
mov ebp, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test ax, ax
je 0x4be5c6
mov ebx, esi
test esi, esi
je 0x4be391
movzx eax, word [esi]
test ax, ax
je 0x4be391
mov edi, eax
nop dword [eax]
nop dword [eax + eax]
mov ecx, 0x4f94c4
mov edx, 0x20
nop word [eax + eax]
cmp di, dx
je 0x4be3a8
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x4be370
movzx eax, word [ebx + 2]
add ebx, 2
mov edi, eax
test ax, ax
jne 0x4be360
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4be396
sub ecx, edx
sar ecx, 1
lea ebx, [esi + ecx*2]
movzx eax, word [ebx]
mov dword [esp + 0x24], eax
xor eax, eax
push str.Bold
push esi
mov word [ebx], ax
call ebp
add esp, 8
test eax, eax
jne 0x4be3ec
mov edx, dword [esp + 0x10]
mov dword [esp + 0x3c], 0x2bc
jmp 0x4be58d
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x7c]
xor ecx, esp
call fcn.004ebadf
add esp, 0x80
ret
push str.italic
push esi
call ebp
add esp, 8
test eax, eax
jne 0x4be409
mov edx, dword [esp + 0x10]
mov byte [esp + 0x40], 1
jmp 0x4be58d
push str.norm
push esi
call ebp
add esp, 8
test eax, eax
jne 0x4be432
mov edx, dword [esp + 0x10]
mov word [esp + 0x40], ax
mov byte [esp + 0x42], al
mov dword [esp + 0x3c], 0x190
jmp 0x4be58d
push str.underline
push esi
call ebp
add esp, 8
test eax, eax
jne 0x4be44f
mov edx, dword [esp + 0x10]
mov byte [esp + 0x41], 1
jmp 0x4be58d
push str.strike
push esi
call ebp
add esp, 8
test eax, eax
jne 0x4be46c
mov edx, dword [esp + 0x10]
mov byte [esp + 0x42], 1
jmp 0x4be58d
movzx eax, word [esi]
mov ebp, eax
mov edi, eax
test eax, 0xffffff80
je 0x4be47e
xor eax, eax
jmp 0x4be488
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_islower]
add esp, 4
and edi, 0xffdf
mov ecx, ebp
test eax, eax
movzx edx, di
lea edi, [esi + 2]
cmove edx, ecx
cmp word [edi], 0
movzx ebp, dx
je case.0x4be4de.68
push ebp
push 0x505d54
call sub.VCRUNTIME140.dll_wcschr
add esp, 8
test eax, eax
je 0x4be4cf
push 0
push 1
push 0
push 0
push edi
call fcn.004e47f0
add esp, 0x14
test eax, eax
je case.0x4be4de.68
lea eax, [ebp - 0x43]
cmp eax, 0x14
ja case.0x4be4de.68
movzx eax, byte [eax + 0x4be824]
jmp dword [eax*4 + 0x4be810]
push edi
call fcn.004e2560
mov edx, eax
add esp, 4
mov dword [esp + 0x10], edx
cmp edx, 0xffffffff
jne 0x4be587
push 0x10
lea eax, [esp + 0x24]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstol]
movzx edx, al
add esp, 0xc
movzx ecx, ax
shl edx, 8
shr ecx, 8
or edx, ecx
shr eax, 0x10
shl edx, 8
movzx eax, al
or edx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], edx
cmp word [eax], 0
je 0x4be583
push 0
push esi
push str.Invalid_option.
call fcn.0046fa80
add esp, 0xc
or eax, 0xffffffff
jmp 0x4be7f7
push edi
call fcn.004e6170
mov dword [esp + 0x40], eax
jmp 0x4be580
push edi
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtof]
fadd qword [0x5045c8]
fstp qword [esp + 0x1c]
cvttsd2si eax, qword [esp + 0x1c]
mov dword [esp + 0x1c], eax
jmp 0x4be580
push edi
call fcn.004e6170
mov byte [esp + 0x4a], al
add esp, 4
mov edx, dword [esp + 0x10]
mov ebp, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
mov eax, dword [esp + 0x24]
mov esi, ebx
mov word [ebx], ax
movzx eax, ax
nop dword [eax]
cmp ax, 0x20
je 0x4be5ac
cmp ax, 9
jne 0x4be5b5
movzx eax, word [esi + 2]
add esi, 2
jmp 0x4be5a0
test ax, ax
jne 0x4be344
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
test ebx, ebx
je 0x4be5cc
mov dword [ebx], edx
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0x5a
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x4be5f7
push 0x48
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
neg eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x48]
push eax
push esi
call fcn.004e3c60
add esp, 8
test al, al
jne 0x4be622
lea ecx, [edi + 0x1c]
lea edx, [esp + 0x48]
sub edx, ecx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x4be612
push esi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edx, dword fs:[0x2c]
xor edi, edi
mov ebx, dword [0x62271c]
mov eax, dword [edx + ebx*4]
cmp dword [eax + 0x1e64], edi
jle 0x4be6c4
xor esi, esi
nop word [eax + eax]
mov eax, dword [eax + 0x1e60]
lea ecx, [esp + 0x48]
add eax, 0x1c
push ecx
add eax, esi
push eax
call ebp
mov edx, dword fs:[0x2c]
add esp, 8
test eax, eax
jne 0x4be6b5
mov eax, dword [edx + ebx*4]
mov ecx, dword [eax + 0x1e60]
mov eax, dword [ecx + esi]
cmp eax, dword [esp + 0x2c]
jne 0x4be6b5
mov eax, dword [ecx + esi + 0x10]
cmp eax, dword [esp + 0x3c]
jne 0x4be6b5
mov al, byte [ecx + esi + 0x14]
cmp al, byte [esp + 0x40]
jne 0x4be6b5
mov al, byte [ecx + esi + 0x15]
cmp al, byte [esp + 0x41]
jne 0x4be6b5
mov al, byte [ecx + esi + 0x16]
cmp al, byte [esp + 0x42]
jne 0x4be6b5
mov al, byte [ecx + esi + 0x1a]
cmp al, byte [esp + 0x46]
je 0x4be708
mov eax, dword [edx + ebx*4]
inc edi
add esi, 0x60
cmp edi, dword [eax + 0x1e64]
jl 0x4be650
mov eax, dword [edx + ebx*4]
cmp dword [eax + 0x1e64], 0xc8
jl 0x4be714
cmp byte [eax + 0x2198], 0
jne 0x4be6e8
call fcn.004ebad3
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ebx*4]
push 0x4f5b70
push str.Too_many_fonts.
mov ecx, dword [ecx + 0x298]
call fcn.0046cf30
or eax, 0xffffffff
jmp 0x4be7f7
cmp edi, 0xffffffff
je 0x4be6c4
mov eax, edi
jmp 0x4be7f7
lea eax, [esp + 0x2c]
mov dword [esp + 0x30], 0
push eax
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov word [esp + 0x47], 0x401
mov byte [esp + 0x49], 0
mov byte [esp + 0x4b], 0
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
mov dword [esp + 0x88], eax
test eax, eax
jne 0x4be78f
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + ebx*4]
cmp byte [eax + 0x2198], 0
jne 0x4be772
call fcn.004ebad3
mov ecx, dword fs:[0x2c]
mov ecx, dword [ecx + ebx*4]
push 0x4f5b70
push str.Cant_create_font.
mov ecx, dword [ecx + 0x298]
call fcn.0046cf30
or eax, 0xffffffff
jmp 0x4be7f7
mov eax, dword fs:[0x2c]
movups xmm0, xmmword [esp + 0x2c]
mov ecx, dword [eax + ebx*4]
mov eax, dword [ecx + 0x1e64]
lea eax, [eax + eax*2]
shl eax, 5
add eax, dword [ecx + 0x1e60]
movups xmmword [eax], xmm0
movups xmm0, xmmword [esp + 0x3c]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [esp + 0x4c]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [esp + 0x5c]
movups xmmword [eax + 0x30], xmm0
movups xmm0, xmmword [esp + 0x6c]
movups xmmword [eax + 0x40], xmm0
movups xmm0, xmmword [esp + 0x7c]
movups xmmword [eax + 0x50], xmm0
mov eax, dword fs:[0x2c]
mov edx, dword [eax + ebx*4]
mov eax, dword [edx + 0x1e64]
lea ecx, [eax + 1]
mov dword [edx + 0x1e64], ecx
mov ecx, dword [esp + 0x8c]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004ebadf
add esp, 0x80
ret