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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xf4
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push edi
push edi
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edi
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [ebp + 0x64]
mov eax, 2
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov eax, dword [ecx]
dec eax
xor ebx, ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x5c], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov edx, dword [ebp + 8]
cmp edi, dword [edx]
jge 0x523325
mov eax, dword [ebp + 0xc]
test eax, eax
mov esi, dword [ebp + 0x10]
je 0x52308d
push edi
push esi
call fcn.0057aa30
add esp, 8
test eax, eax
jle 0x523065
mov dword [esp + 0x28], 1
jmp case.0x523112.4
cmp eax, 0xffffffff
jne 0x523079
inc edi
mov dword [esp + 0x28], 1
mov dword [esp + 0x18], edi
jmp 0x523035
cmp eax, 0xfffffffe
jne 0x52308d
inc edi
mov dword [esp + 0x28], 1
mov dword [esp + 0x18], edi
jmp 0x523035
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
je 0x5230ed
push edi
push esi
call fcn.005cf858
add esp, 8
cmp eax, 1
mov dword [esp + 0x20], eax
jne 0x5230de
mov al, byte [edi + esi + 1]
test al, al
jne 0x5230ba
inc edi
mov dword [esp + 0x18], edi
jmp 0x523035
mov ecx, dword [ebp + 0x10]
lea esi, [edi + 1]
push esi
push ecx
call fcn.005cf858
add esp, 8
cmp eax, 2
je case.0x523112.4
mov edi, esi
mov dword [esp + 0x18], edi
jmp 0x523035
cmp eax, 2
jne 0x5230ed
inc edi
mov dword [esp + 0x18], edi
jmp 0x523035
mov edx, dword [ebp + 0x10]
movzx eax, byte [edi + edx]
lea esi, [edi + edx]
add eax, 0xfffffffe
cmp eax, 0x1d
mov dword [esp + 0x20], 0
ja case.0x523112.4
movzx eax, byte [eax + 0x523c3c]
jmp dword [eax*4 + 0x523c1c]
test byte [ebp + 0x5c], 4
jne case.0x523112.4
mov ecx, dword [ebp + 0x18]
cmp dword [ecx], 0
je 0x523139
mov edx, dword [ebp + 0x1c]
mov dword [edx], 1
jmp case.0x523112.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x52314c
dec edi
mov dword [eax], 1
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 0x28]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x523b27
test byte [ebp + 0x5c], 4
jne case.0x523112.4
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x52317f
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x523112.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x523192
dec edi
mov dword [eax], 1
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 0x2c]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x523b27
test byte [ebp + 0x5c], 4
jne case.0x523112.4
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x5231c5
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x523112.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x5231d8
dec edi
mov dword [eax], 1
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 0x30]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x523b27
test byte [ebp + 0x5c], 4
jne case.0x523112.4
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x52320b
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x523112.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x523220
lea ecx, [edi - 1]
mov dword [eax], 1
mov dword [esp + 0x10], ecx
mov edx, dword [0x613690]
push edx
call fcn.0043bf80
push eax
push 0
push 0
push 0
push esi
call fcn.00522aa0
add esp, 0x18
add edi, eax
mov dword [esp + 0x18], edi
jmp 0x523b27
test byte [ebp + 0x5c], 4
jne case.0x523112.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x523264
dec edi
mov dword [eax], 1
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 0x18]
cmp dword [eax], 0
je 0x523274
mov ecx, dword [ebp + 0x1c]
jmp 0x523359
mov edx, dword [ebp + 0x30]
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp + 0x28]
mov dword [edx], 0
mov dword [eax], 0
mov dword [ecx], 0
jmp 0x523b27
test byte [ebp + 0x5c], 4
jne case.0x523112.4
cmp dword [ebp + 0x60], 9
jne case.0x523112.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
je 0x5232c6
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
jne 0x5232d1
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x523112.4
dec edi
mov dword [eax], 1
mov dword [esp + 0x10], edi
mov eax, dword [ebp + 0x18]
inc dword [eax]
jmp 0x523b27
test byte [ebp + 0x5c], 0x40
je case.0x523112.4
cmp byte [esi + 1], 0xa
jne case.0x523112.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
je 0x523301
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x52330e
mov dword [esp + 0x4c], 1
jmp case.0x523112.4
lea ecx, [edi - 1]
mov dword [eax], 1
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x2c]
inc ecx
inc edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], edi
jmp 0x523b27
mov edi, dword [esp + 0x18]
test ebx, ebx
jne 0x523b7e
mov ecx, dword [ebp + 0x24]
cmp dword [ecx], 0
je 0x52333f
mov dword [esp + 0x24], 1
jmp case.0x523112.4
mov edx, dword [ebp + 8]
mov eax, dword [edx]
cmp edi, eax
mov dword [esp + 0x10], edi
jl 0x523351
dec eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], 1
mov dword [ecx], 1
cmp dword [esp + 0x14], 0xffffffff
jne 0x52336e
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x24]
mov edx, dword [eax]
xor ecx, ecx
cmp edx, ecx
je 0x523b27
mov edx, dword [ebp + 0x18]
mov dword [eax], ecx
mov eax, dword [edx]
cmp eax, ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x78], ecx
je 0x523414
mov dword [esp + 0x48], 1
jle 0x52340b
mov edi, dword [ebp + 0x20]
mov esi, dword [ebp + 0x4c]
mov ebx, dword [esp + 0x30]
test esi, esi
je 0x5233f9
test edi, edi
je 0x5233f9
mov edx, dword [edi]
test edx, edx
jl 0x5233e7
cmp edx, 0x32
jge 0x5233e7
mov ecx, dword [esi + edx*4 + 0x794]
test ecx, ecx
mov eax, dword [esi + 0xa04]
jle 0x5233db
imul eax, ecx
add eax, 2
inc edx
mov dword [edi], edx
mov dword [esp + 0x78], eax
jmp 0x5233fd
lea eax, [ebx + eax*8]
inc edx
mov dword [edi], edx
mov dword [esp + 0x78], eax
jmp 0x5233fd
mov ecx, dword [esi + 0xa04]
lea eax, [ebx + ecx*8]
inc edx
mov dword [edi], edx
mov dword [esp + 0x78], eax
jmp 0x5233fd
mov dword [esp + 0x78], ebx
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
dec edx
mov ecx, edx
test ecx, ecx
mov dword [eax], edx
jg 0x5233a8
mov edx, dword [ebp + 0x18]
mov dword [edx], 0
mov eax, dword [esp + 0x14]
test eax, eax
jl 0x5239d2
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x5239d2
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp ecx, eax
jl 0x5239d2
mov esi, dword [esp + 0x14]
mov eax, ecx
sub eax, esi
inc eax
test eax, eax
mov dword [esp + 0xc], eax
jle 0x5239d2
mov eax, dword [esp + 0x28]
mov edi, dword [ebp + 0x10]
xor ebx, ebx
cmp eax, ebx
je 0x523479
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x18]
push edx
push edi
call fcn.0057b760
add esp, 0xc
test eax, eax
je 0x5239d2
cmp dword [ebp + 0x14], ebx
je 0x5234b1
mov eax, dword [esp + 0x14]
cmp eax, ebx
jle 0x5234b1
push eax
push edi
call fcn.005cf858
add esp, 8
cmp eax, 2
jne 0x5234b1
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
dec ecx
inc eax
mov dword [esp + 0x20], 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
jmp 0x5234b7
cmp dword [esp + 0x20], ebx
je 0x52350c
mov eax, dword [esp + 0x14]
push eax
push edi
call fcn.005cf858
add esp, 8
cmp eax, 1
jne 0x523508
mov eax, dword [esp + 0xc]
cmp eax, 1
jne 0x5234dd
mov dword [esp + 0xc], 2
jmp 0x5234e2
cmp eax, 2
jne 0x52350c
mov eax, dword [esp + 0x14]
mov cl, byte [eax + edi + 1]
test cl, cl
je 0x5239d2
inc eax
push eax
push edi
call fcn.005cf858
add esp, 8
cmp eax, 2
jne 0x5239d2
jmp 0x52350c
mov dword [esp + 0x20], ebx
mov eax, dword [esp + 0x28]
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x10], esi
je 0x523543
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
push ecx
add edx, edi
push edx
call fcn.00579010
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [esp + 0x10], esi
je 0x523543
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0xc], eax
cmp esi, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x54], ebx
je 0x523590
mov eax, dword [esp + 0xc]
mov edi, dword [ebp + 0x34]
push 1
push str.measuretext_fill
push ebx
push eax
push esi
push edi
call fcn.00497b40
mov ecx, dword [esp + 0x24]
push ebx
push str.measuretext_start
push ebx
push ecx
push esi
push edi
call fcn.00497b40
add esp, 0x30
cmp eax, ebx
jle 0x523590
mov edx, dword [esp + 0xc]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x54], edx
mov dword [esp + 0xc], eax
mov ecx, dword [ebp + 0x34]
lea eax, [esp + 0x90]
push eax
push ecx
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov eax, dword [ebp + 0x38]
mov edx, dword [esp + 0xb0]
mov ecx, dword [esp + 0xc]
mov dword [eax], edx
mov eax, 1
mov dword [esp + 0x64], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x68], eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x44], eax
mov ebx, ecx
lea ecx, [ecx]
mov esi, dword [esp + 0x10]
test esi, esi
mov eax, ecx
je 0x523603
cmp ecx, 0xffffffff
jne 0x5235e6
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp + 0x34]
lea ecx, [esp + 0x88]
push ecx
push eax
push esi
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPointW]
mov esi, dword [esp + 0x88]
jmp 0x52363a
mov edx, dword [ebp + 0x10]
mov esi, dword [esp + 0x14]
add edx, esi
cmp ecx, 0xffffffff
jne 0x52361f
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x523616
sub eax, esi
lea ecx, [esp + 0x80]
push ecx
push eax
push edx
mov edx, dword [ebp + 0x34]
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPointA]
mov esi, dword [esp + 0x80]
mov eax, dword [ebp + 0x38]
mov ecx, dword [eax]
mov eax, dword [esp + 0x48]
sub esi, ecx
test eax, eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x40], esi
je 0x52366c
mov ecx, dword [esp + 0x78]
lea edx, [esi + eax]
cmp edx, ecx
jle 0x52366c
mov esi, ecx
sub esi, eax
mov dword [esp + 0x40], esi
jns 0x52366c
xor esi, esi
mov dword [esp + 0x40], esi
lea ecx, [esi + eax]
mov eax, dword [ebp + 0x3c]
add eax, 0xfffffffe
cmp ecx, eax
jle 0x523895
mov edx, dword [ebp + 0x40]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x30]
cmp eax, dword [ecx]
mov dword [esp + 0x68], 0
mov dword [esp + 0x5c], 1
je 0x52369b
mov dword [ecx], eax
mov eax, dword [ebp + 0x44]
mov ecx, dword [ebp + 0x28]
mov eax, dword [eax]
cmp eax, dword [ecx]
je 0x5236a9
mov dword [ecx], eax
mov ecx, dword [ebp + 0x48]
mov eax, dword [ecx]
mov ecx, dword [ebp + 0x2c]
cmp eax, dword [ecx]
je 0x5236b7
mov dword [ecx], eax
mov ecx, dword [esp + 0xc]
cmp ecx, 1
jge 0x5236c5
mov ecx, 1
mov edi, dword [esp + 0x44]
mov eax, ecx
sub eax, edi
cdq
sub eax, edx
sar eax, 1
test eax, eax
mov ebx, ecx
mov dword [esp + 0x58], ebx
jg 0x5236e1
mov eax, 1
sub ecx, eax
cmp ecx, edi
mov dword [esp + 0xc], ecx
jge 0x5236f1
mov ecx, edi
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x10]
test eax, eax
je 0x52382d
mov edx, eax
xor eax, eax
mov ax, word [edx + ecx*2]
mov edi, ecx
push eax
call fcn.00579220
add esp, 4
test eax, eax
je 0x52373e
dec edi
test edi, edi
jle 0x523745
lea esp, [esp]
mov ecx, dword [esp + 0x10]
xor edx, edx
mov dx, word [ecx + edi*2]
push edx
call fcn.00579220
add esp, 4
test eax, eax
je 0x52373e
dec edi
test edi, edi
jg 0x523720
jmp 0x523743
test edi, edi
jle 0x523745
dec edi
test edi, edi
jl 0x523869
mov eax, dword [esp + 0x10]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x1c]
or ebx, 0xffffffff
test eax, eax
lea ecx, [edi + 1]
mov dword [esp + 0xc], ecx
je 0x5237b5
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x10]
mov edx, esi
lea eax, [edx + eax*2]
cmp esi, eax
jae 0x523784
cmp esi, ecx
je 0x523788
add esi, 2
jne 0x523777
cmp esi, ecx
jne 0x5237b5
mov edx, dword [esp + 0x1c]
mov esi, ecx
sub esi, edx
sar esi, 1
test esi, esi
jl 0x5237b5
mov eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp esi, eax
jge 0x5237b5
mov edx, dword [esp + 0x1c]
lea ecx, [esi + edi + 1]
mov ebx, esi
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x10]
push eax
push esi
call fcn.00579110
add esp, 8
test eax, eax
je 0x52397c
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x5237d4
mov edx, dword [esp + 0x14]
sub ecx, esi
add ecx, edx
push eax
mov dword [esp + 0x1c], ecx
call fcn.005cc393
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
je 0x523817
cmp ebx, 0xffffffff
je 0x523817
mov ecx, dword [esp + 0xc]
sub ecx, ebx
cmp ecx, 1
mov dword [esp + 0xc], ecx
jge 0x52381b
mov ecx, 1
mov dword [esp + 0xc], ecx
jmp 0x52381b
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0x58]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x10], eax
jmp 0x52386d
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x52385c
cmp ecx, 1
jle 0x52385c
mov edx, dword [esp + 0x14]
lea eax, [ecx + edx - 1]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call fcn.005cf858
mov ecx, dword [esp + 0x14]
add esp, 8
cmp eax, 1
jne 0x52385c
dec ecx
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x14]
lea eax, [ecx + edx]
mov dword [esp + 0x18], eax
jmp 0x52386d
mov ecx, dword [esp + 0xc]
cmp dword [esp + 0x44], ebx
jge 0x523885
mov eax, dword [esp + 0x60]
inc eax
cmp eax, 0x40
mov dword [esp + 0x60], eax
jl 0x5235d0
dec dword [esp + 0x18]
jns 0x523899
mov dword [esp + 0x18], 0
jmp 0x523899
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x64]
inc eax
cmp eax, 0x40
mov dword [esp + 0x64], eax
jge 0x523917
cmp ecx, dword [esp + 0x44]
je 0x523917
cmp ecx, ebx
mov dword [esp + 0x44], ecx
jge 0x523917
mov eax, ebx
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
test eax, eax
jg 0x5238c7
mov eax, 1
add ecx, eax
cmp ecx, ebx
mov dword [esp + 0xc], ecx
jle 0x5238d7
mov ecx, ebx
mov dword [esp + 0xc], ecx
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x5235d0
cmp ecx, 1
jle 0x5235d0
mov edx, dword [esp + 0x14]
lea eax, [ecx + edx - 1]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call fcn.005cf858
mov ecx, dword [esp + 0x14]
add esp, 8
cmp eax, 1
jne 0x5235d0
inc ecx
mov dword [esp + 0xc], ecx
jmp 0x5235d0
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x1c]
add esi, edx
test edi, edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x30], esi
je 0x5239c1
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x54]
sub esi, ecx
lea eax, [eax + ecx*2]
mov ecx, dword [esp + 0x68]
test ecx, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x54], esi
je 0x5239a6
test esi, esi
jle 0x5239a6
mov ecx, dword [ebp + 0x34]
push 0
push str.measuretext_next
push 1
push esi
push eax
push ecx
call fcn.00497b40
add esp, 0x18
xor ebx, ebx
test eax, eax
jg 0x52358c
mov dword [esp + 0xc], esi
jmp 0x523590
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x52399f
mov edx, dword [ebp + 0x34]
push 0
push str.measuretext_end
push 2
push 0
push 0
push edx
call fcn.00497b40
add esp, 0x18
mov esi, edi
test esi, esi
je 0x5239d2
push esi
jmp 0x5239ca
mov eax, dword [ebp + 0x34]
push 0
push str.measuretext_end
push 2
push 0
push 0
push eax
call fcn.00497b40
add esp, 0x18
jmp 0x5239c5
mov edi, dword [esp + 0x10]
test edi, edi
je 0x5239d2
push edi
call fcn.005cc393
add esp, 4
mov eax, dword [esp + 0x48]
test eax, eax
je 0x5239e2
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x30], ecx
mov edx, dword [ebp + 0x30]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x40]
cmp dword [ecx], eax
je 0x5239f0
mov dword [ecx], eax
mov eax, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x44]
mov eax, dword [eax]
cmp dword [ecx], eax
jne 0x523a0c
mov edx, dword [ebp + 0x48]
mov esi, dword [ebp + 0x2c]
mov edx, dword [edx]
cmp edx, dword [esi]
je 0x523aca
mov edx, dword [ebp + 0x48]
mov esi, dword [ebp + 0x50]
mov ebx, dword [ebp + 0x34]
mov dword [ecx], eax
mov eax, dword [ebp + 0x2c]
mov ecx, dword [eax]
mov dword [edx], ecx
mov eax, dword [esi]
test eax, eax
je 0x523a32
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esi], 0
mov edi, dword [ebp + 0x54]
mov eax, dword [edi]
test eax, eax
je 0x523a48
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov dword [edi], 0
mov ecx, dword [ebp + 0x44]
cmp dword [ecx], 0
mov eax, dword [ebp + 0x68]
je 0x523a6c
xor edx, edx
cmp eax, 0x190
setne dl
dec edx
and edx, 0x12c
add edx, 0x190
mov eax, edx
mov ecx, dword [ebp + 0x74]
mov edx, dword [ebp + 0x70]
push ecx
mov ecx, dword [ebp + 0x48]
push 0
push 0
push 0
push 0
push edx
mov edx, dword [ecx]
push 0
push edx
push 0
push eax
mov eax, dword [ebp + 0x6c]
push 0
push 0
push 0
neg eax
push eax
call dword [sym.imp.GDI32.dll_CreateFontA]
test eax, eax
mov dword [edi], eax
je 0x523aa2
push eax
jmp 0x523aa6
mov ecx, dword [ebp + 0x78]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
lea edx, [esp + 0xc8]
push edx
push ebx
mov dword [esi], eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov eax, dword [esp + 0xe8]
mov ecx, dword [ebp + 0x38]
mov dword [ecx], eax
mov eax, dword [esp + 0x2c]
xor ecx, ecx
cmp eax, ecx
je 0x523b0e
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x50]
add eax, 0xfffffffe
cmp eax, edx
mov dword [esp + 0x2c], ecx
jle 0x523aeb
mov dword [esp + 0x50], eax
mov edx, dword [ebp + 0x64]
mov edx, dword [edx]
mov eax, 2
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x34], eax
lea eax, [edx + eax - 1]
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x14], edx
cmp dword [eax], ecx
mov dword [esp + 0x10], ecx
jne 0x523b59
cmp dword [esp + 0x4c], ecx
jne 0x523b74
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x30]
add eax, 0xfffffffe
cmp ecx, eax
jl 0x523b3f
mov ebx, 1
jmp 0x523321
mov ebx, dword [esp + 0x24]
test ebx, ebx
jne 0x523321
mov edi, dword [esp + 0x18]
inc edi
mov dword [esp + 0x18], edi
jmp 0x523035
mov dword [eax], 0
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x14], 0xffffffff
jmp 0x523035
mov dword [esp + 0x4c], 0
jmp 0x523b5f
mov ecx, dword [ebp + 0x58]
mov eax, dword [esp + 0x38]
mov dword [ecx], edi
mov edi, dword [esp + 0x50]
add eax, 0xfffffffe
cmp eax, edi
jle 0x523b94
mov edi, eax
mov ecx, dword [ebp + 0x5c]
test cl, cl
jns 0x523bc9
mov eax, dword [ebp + 0x7c]
test eax, eax
je 0x523bc9
mov esi, dword [ebp + 0x68]
mov edx, dword [ebp + 0x44]
mov dword [eax], esi
cmp dword [edx], 0
je 0x523bc9
xor edx, edx
cmp esi, 0x190
setne dl
dec edx
and edx, 0x12c
add edx, 0x190
mov dword [eax], edx
test cl, 8
je 0x523bdc
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x523bdc
mov edi, dword [ebp + 0x3c]
add edi, 0xfffffffe
test cl, 1
je 0x523c03
test cl, 2
je 0x523bfa
movzx eax, word [esp + 0x3c]
movzx ecx, di
shl eax, 0x10
or eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x3c]
and cl, 2
neg cl
pop edi
pop esi
pop ebx
sbb ecx, ecx
and ecx, eax
mov eax, ecx
mov esp, ebp
pop ebp
ret