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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xfc
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 + 0x30], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], edi
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [ebp + 0x64]
mov edx, dword [ecx]
mov eax, 2
xor ebx, ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x64], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x50], edi
mov eax, dword [ebp + 8]
cmp edi, dword [eax]
jge 0x52a624
mov eax, dword [ebp + 0xc]
test eax, eax
mov esi, dword [ebp + 0x10]
je 0x52a3a8
push edi
push esi
call fcn.005867a0
add esp, 8
test eax, eax
jle 0x52a380
mov dword [esp + 0x2c], 1
jmp case.0x52a42c.4
cmp eax, 0xffffffff
jne 0x52a394
inc edi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x1c], edi
jmp 0x52a350
cmp eax, 0xfffffffe
jne 0x52a3a8
inc edi
mov dword [esp + 0x2c], 1
mov dword [esp + 0x1c], edi
jmp 0x52a350
mov ecx, dword [ebp + 0x14]
cmp dword [ecx], 0
je 0x52a408
push edi
push esi
call fcn.005dd489
add esp, 8
cmp eax, 1
mov dword [esp + 0x24], eax
jne 0x52a3f9
mov al, byte [edi + esi + 1]
test al, al
jne 0x52a3d5
inc edi
mov dword [esp + 0x1c], edi
jmp 0x52a350
mov edx, dword [ebp + 0x10]
lea esi, [edi + 1]
push esi
push edx
call fcn.005dd489
add esp, 8
cmp eax, 2
je case.0x52a42c.4
mov edi, esi
mov dword [esp + 0x1c], edi
jmp 0x52a350
cmp eax, 2
jne 0x52a408
inc edi
mov dword [esp + 0x1c], edi
jmp 0x52a350
mov eax, dword [ebp + 0x10]
lea esi, [edi + eax]
movzx eax, byte [esi]
add eax, 0xfffffffe
cmp eax, 0x1d
mov dword [esp + 0x24], 0
ja case.0x52a42c.4
movzx ecx, byte [eax + 0x52aff0]
jmp dword [ecx*4 + 0x52afd0]
test byte [ebp + 0x5c], 4
jne case.0x52a42c.4
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x52a453
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x52a42c.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x52a465
mov dword [eax], 1
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 0x28]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x52aee4
test byte [ebp + 0x5c], 4
jne case.0x52a42c.4
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x52a498
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x52a42c.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x52a4aa
mov dword [eax], 1
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 0x2c]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x52aee4
test byte [ebp + 0x5c], 4
jne case.0x52a42c.4
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x52a4dd
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x52a42c.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x52a4ef
mov dword [eax], 1
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 0x30]
mov edx, dword [eax]
xor ecx, ecx
test edx, edx
sete cl
mov dword [eax], ecx
jmp 0x52aee4
test byte [ebp + 0x5c], 4
jne case.0x52a42c.4
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x52a522
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x52a42c.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x52a534
mov dword [eax], 1
mov dword [esp + 0x14], edi
mov ecx, dword [0x63ca90]
push ecx
call fcn.0043c610
push eax
push 0
push 0
push 0
push esi
call fcn.00529b50
add esp, 0x18
add edi, eax
mov dword [esp + 0x1c], edi
jmp 0x52aee4
test byte [ebp + 0x5c], 4
jne case.0x52a42c.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x52a577
mov dword [eax], 1
mov dword [esp + 0x14], edi
mov edx, dword [ebp + 0x18]
cmp dword [edx], 0
je 0x52a58d
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp case.0x52a42c.4
mov ecx, dword [ebp + 0x30]
mov edx, dword [ebp + 0x2c]
mov eax, dword [ebp + 0x28]
mov dword [ecx], 0
mov dword [edx], 0
mov dword [eax], 0
jmp 0x52aee4
test byte [ebp + 0x5c], 4
jne case.0x52a42c.4
cmp dword [ebp + 0x60], 9
jne case.0x52a42c.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
je 0x52a5dc
mov ecx, dword [ebp + 0x18]
cmp dword [ecx], 0
jne 0x52a5e6
mov edx, dword [ebp + 0x1c]
mov dword [edx], 1
jmp case.0x52a42c.4
mov dword [eax], 1
mov dword [esp + 0x14], edi
mov eax, dword [ebp + 0x18]
inc dword [eax]
jmp 0x52aee4
test byte [ebp + 0x5c], 0x40
je case.0x52a42c.4
cmp byte [esi + 1], 0xa
jne case.0x52a42c.4
mov eax, dword [ebp + 0x24]
cmp dword [eax], 0
jne 0x52a60e
mov dword [eax], 1
mov dword [esp + 0x14], edi
inc edi
mov dword [esp + 0x58], 1
mov dword [esp + 0x1c], edi
jmp 0x52aee4
mov edi, dword [esp + 0x1c]
test ebx, ebx
jne 0x52af34
mov ecx, dword [ebp + 0x24]
cmp dword [ecx], 0
jne 0x52a64b
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp edi, eax
mov dword [esp + 0x14], edi
jl 0x52a645
mov dword [esp + 0x14], eax
mov dword [ecx], 1
mov dword [esp + 0x48], 1
cmp dword [esp + 0x18], 0xffffffff
jne 0x52a662
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], ecx
mov eax, dword [ebp + 0x24]
mov edx, dword [eax]
xor ecx, ecx
cmp edx, ecx
je 0x52aee4
mov edx, dword [ebp + 0x18]
mov dword [eax], ecx
mov eax, dword [edx]
cmp eax, ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x90], ecx
je 0x52a718
mov dword [esp + 0x4c], 1
jle 0x52a70f
mov esi, dword [ebp + 0x4c]
mov edi, dword [ebp + 0x20]
mov ebx, dword [esp + 0x30]
nop
test esi, esi
je 0x52a6fa
test edi, edi
je 0x52a6fa
mov edx, dword [edi]
test edx, edx
jl 0x52a6e5
cmp edx, 0x32
jge 0x52a6e5
mov ecx, dword [esi + edx*4 + 0x138c]
test ecx, ecx
mov eax, dword [esi + 0x18a0]
jle 0x52a6d6
imul eax, ecx
add eax, 2
inc edx
mov dword [edi], edx
mov dword [esp + 0x90], eax
jmp 0x52a701
lea eax, [ebx + eax*8]
inc edx
mov dword [edi], edx
mov dword [esp + 0x90], eax
jmp 0x52a701
mov ecx, dword [esi + 0x18a0]
lea eax, [ebx + ecx*8]
inc edx
mov dword [edi], edx
mov dword [esp + 0x90], eax
jmp 0x52a701
mov dword [esp + 0x90], ebx
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
dec edx
mov ecx, edx
test ecx, ecx
mov dword [eax], edx
jg 0x52a6a0
mov edx, dword [ebp + 0x18]
mov dword [edx], 0
mov eax, dword [esp + 0x18]
test eax, eax
jl 0x52ad95
mov eax, dword [esp + 0x14]
test eax, eax
jl 0x52ad95
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jl 0x52ad95
mov edx, dword [esp + 0x18]
mov eax, ecx
sub eax, edx
test eax, eax
mov dword [esp + 0x10], eax
jle 0x52ad95
mov eax, dword [esp + 0x2c]
mov edi, dword [ebp + 0x10]
xor ebx, ebx
cmp eax, ebx
je 0x52a77c
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
push edi
call fcn.00587700
add esp, 0xc
test eax, eax
je 0x52ad95
cmp dword [ebp + 0x14], ebx
je 0x52a7b4
mov eax, dword [esp + 0x18]
cmp eax, ebx
jle 0x52a7b4
push eax
push edi
call fcn.005dd489
add esp, 8
cmp eax, 2
jne 0x52a7b4
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
dec ecx
inc eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
jmp 0x52a7ba
cmp dword [esp + 0x24], ebx
je 0x52a80f
mov eax, dword [esp + 0x18]
push eax
push edi
call fcn.005dd489
add esp, 8
cmp eax, 1
jne 0x52a80b
mov eax, dword [esp + 0x10]
cmp eax, 1
jne 0x52a7e0
mov dword [esp + 0x10], 2
jmp 0x52a7e5
cmp eax, 2
jne 0x52a80f
mov eax, dword [esp + 0x18]
mov cl, byte [eax + edi + 1]
test cl, cl
je 0x52ad95
inc eax
push eax
push edi
call fcn.005dd489
add esp, 8
cmp eax, 2
jne 0x52ad95
jmp 0x52a80f
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x2c]
xor esi, esi
cmp eax, ebx
mov dword [esp + 0x14], esi
je 0x52a846
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push ecx
add edx, edi
push edx
call fcn.00584e40
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [esp + 0x14], esi
je 0x52a846
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x10], eax
cmp esi, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x54], ebx
je 0x52a893
mov eax, dword [esp + 0x10]
mov edi, dword [ebp + 0x34]
push 1
push str.measuretext_fill
push ebx
push eax
push esi
push edi
call fcn.00499b90
mov ecx, dword [esp + 0x28]
push ebx
push str.measuretext_start
push ebx
push ecx
push esi
push edi
call fcn.00499b90
add esp, 0x30
cmp eax, ebx
jle 0x52a893
mov edx, dword [esp + 0x10]
mov dword [esp + 0x20], esi
mov dword [esp + 0x54], edx
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 0x34]
lea eax, [esp + 0x98]
push eax
push ecx
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov eax, dword [ebp + 0x38]
mov edx, dword [esp + 0xb8]
mov ecx, dword [esp + 0x10]
mov dword [eax], edx
mov eax, 1
mov dword [esp + 0x68], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x28], eax
xor ebx, ebx
mov edi, dword [esp + 0x14]
cmp edi, ebx
je 0x52a99b
cmp ecx, 0xffffffff
mov esi, ecx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
jne 0x52a8f4
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov ecx, dword [0x676e8c]
cmp ecx, ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
je 0x52a97d
mov eax, dword [0x6870c0]
cmp eax, ebx
jne 0x52a941
cmp dword [0x6870f4], ebx
jne 0x52a97d
push str.DrawTextW
push ecx
mov dword [0x6870f4], 1
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [0x6870c0], eax
je 0x52a97d
mov edx, dword [ebp + 0x34]
push 0xd20
lea ecx, [esp + 0x78]
push ecx
push esi
push edi
push edx
call eax
test eax, eax
je 0x52a97d
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x80]
mov esi, dword [esp + 0x74]
mov eax, dword [esp + 0x7c]
sub ecx, edx
mov dword [esp + 0x70], ecx
mov ecx, dword [ebp + 0x38]
mov edx, dword [ecx]
sub eax, esi
sub eax, edx
mov esi, eax
jmp 0x52a9be
mov eax, dword [ebp + 0x34]
lea edx, [esp + 0x6c]
push edx
push esi
push edi
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPointW]
mov ecx, dword [ebp + 0x38]
mov eax, dword [esp + 0x6c]
sub eax, dword [ecx]
mov esi, eax
jmp 0x52a9be
mov edx, dword [esp + 0x18]
mov eax, dword [ebp + 0x10]
push ebx
push ebx
push ebx
push ecx
mov ecx, dword [ebp + 0x34]
add edx, eax
push edx
push ecx
call fcn.0052a000
mov edx, dword [ebp + 0x38]
mov esi, eax
mov eax, dword [edx]
add esp, 0x18
sub esi, eax
cmp esi, ebx
mov dword [esp + 0x40], esi
jge 0x52a9cc
xor esi, esi
mov dword [esp + 0x40], esi
cmp dword [esp + 0x4c], ebx
mov edi, dword [esp + 0x30]
je 0x52aa11
mov eax, dword [ebp + 0x4c]
cmp dword [eax + 0x1454], ebx
mov eax, dword [esp + 0x90]
jne 0x52a9fa
mov ecx, eax
sub ecx, edi
cmp ecx, esi
jge 0x52a9fa
lea eax, [esi + edi]
mov dword [esp + 0x90], eax
lea edx, [esi + edi]
cmp edx, eax
jle 0x52aa11
mov esi, eax
sub esi, edi
mov dword [esp + 0x40], esi
jns 0x52aa11
xor esi, esi
mov dword [esp + 0x40], esi
mov eax, dword [ebp + 0x3c]
lea ecx, [esi + edi]
add eax, 0xfffffffe
cmp ecx, eax
jle 0x52ac59
mov edx, dword [ebp + 0x40]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x30]
cmp eax, dword [ecx]
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x64], 1
je 0x52aa3c
mov dword [ecx], eax
mov eax, dword [ebp + 0x44]
mov ecx, dword [ebp + 0x28]
mov eax, dword [eax]
cmp eax, dword [ecx]
je 0x52aa4a
mov dword [ecx], eax
mov ecx, dword [ebp + 0x48]
mov eax, dword [ecx]
mov ecx, dword [ebp + 0x2c]
cmp eax, dword [ecx]
je 0x52aa58
mov dword [ecx], eax
mov ecx, dword [esp + 0x10]
cmp ecx, 1
jge 0x52aa66
mov ecx, 1
mov edx, dword [esp + 0x28]
mov eax, ecx
sub eax, edx
cdq
sub eax, edx
sar eax, 1
cmp eax, ebx
mov dword [esp + 0x44], ecx
jg 0x52aa80
mov eax, 1
sub ecx, eax
mov eax, dword [esp + 0x28]
cmp ecx, eax
mov dword [esp + 0x10], ecx
jge 0x52aa94
mov ecx, eax
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x52abeb
mov edx, eax
xor eax, eax
mov ax, word [edx + ecx*2]
mov edi, ecx
push eax
call fcn.00584f90
add esp, 4
test eax, eax
je 0x52aade
dec edi
cmp edi, ebx
jle 0x52aae5
lea esp, [esp]
mov ecx, dword [esp + 0x14]
xor edx, edx
mov dx, word [ecx + edi*2]
push edx
call fcn.00584f90
add esp, 4
test eax, eax
je 0x52aade
dec edi
cmp edi, ebx
jg 0x52aac0
jmp 0x52aae3
cmp edi, ebx
jle 0x52aae5
dec edi
cmp edi, ebx
jl 0x52ac29
mov eax, dword [esp + 0x14]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x20]
or ebx, 0xffffffff
test eax, eax
lea ecx, [edi + 1]
mov dword [esp + 0x10], ecx
je 0x52ab5e
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x14]
mov edx, esi
lea eax, [edx + eax*2]
lea ebx, [ebx]
cmp esi, eax
jae 0x52ab2d
cmp esi, ecx
je 0x52ab31
add esi, 2
jne 0x52ab20
cmp esi, ecx
jne 0x52ab5e
mov edx, dword [esp + 0x20]
mov esi, ecx
sub esi, edx
sar esi, 1
test esi, esi
jl 0x52ab5e
mov eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp esi, eax
jge 0x52ab5e
mov edx, dword [esp + 0x20]
lea ecx, [esi + edi + 1]
mov ebx, esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
push eax
push esi
call fcn.00584ef0
add esp, 8
test eax, eax
je 0x52ad3e
mov ecx, eax
lea esi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x52ab80
mov edx, dword [esp + 0x18]
sub ecx, esi
add ecx, edx
push eax
mov dword [esp + 0x20], ecx
call fcn.005d9fa3
mov eax, dword [esp + 0x24]
add esp, 4
test eax, eax
je 0x52abd4
cmp ebx, 0xffffffff
je 0x52abd4
mov ecx, dword [esp + 0x10]
sub ecx, ebx
cmp ecx, 1
mov dword [esp + 0x10], ecx
jge 0x52abd8
mov eax, dword [esp + 0x84]
mov esi, dword [esp + 0x40]
mov ecx, 1
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
xor ebx, ebx
jmp 0x52ac2d
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x84]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x14], eax
xor ebx, ebx
jmp 0x52ac2d
cmp dword [ebp + 0x14], ebx
je 0x52ac1c
cmp ecx, 1
jle 0x52ac1c
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx - 1]
mov ecx, dword [ebp + 0x10]
push eax
push ecx
call fcn.005dd489
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x18]
add esp, 8
cmp eax, 1
jne 0x52ac1c
dec ecx
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx]
mov dword [esp + 0x1c], eax
jmp 0x52ac31
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x44]
cmp dword [esp + 0x28], edx
jge 0x52ac4d
mov eax, dword [esp + 0x60]
inc eax
cmp eax, 0x40
mov dword [esp + 0x60], eax
jl 0x52a8d0
dec dword [esp + 0x1c]
jns 0x52ac5d
mov dword [esp + 0x1c], ebx
jmp 0x52ac5d
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x68]
inc eax
cmp eax, 0x40
mov dword [esp + 0x68], eax
jge 0x52acdd
cmp ecx, dword [esp + 0x28]
je 0x52acdd
mov eax, dword [esp + 0x44]
cmp ecx, eax
mov dword [esp + 0x28], ecx
jge 0x52acdd
mov esi, eax
sub eax, ecx
cdq
sub eax, edx
sar eax, 1
cmp eax, ebx
jg 0x52ac8f
mov eax, 1
add ecx, eax
cmp ecx, esi
mov dword [esp + 0x10], ecx
jle 0x52ac9f
mov ecx, esi
mov dword [esp + 0x10], ecx
cmp dword [ebp + 0x14], ebx
je 0x52a8d0
cmp ecx, 1
jle 0x52a8d0
mov eax, dword [esp + 0x18]
mov edx, dword [ebp + 0x10]
lea ecx, [ecx + eax - 1]
push ecx
push edx
call fcn.005dd489
mov ecx, dword [esp + 0x18]
add esp, 8
cmp eax, 1
jne 0x52a8d0
inc ecx
mov dword [esp + 0x10], ecx
jmp 0x52a8d0
add esi, edi
mov edi, dword [esp + 0x20]
cmp edi, ebx
mov dword [esp + 0x38], esi
mov dword [esp + 0x30], esi
je 0x52ad82
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x54]
sub esi, ecx
lea eax, [eax + ecx*2]
cmp dword [esp + 0x5c], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x54], esi
je 0x52ad68
cmp esi, ebx
jle 0x52ad68
mov ecx, dword [ebp + 0x34]
push ebx
push str.measuretext_next
push 1
push esi
push eax
push ecx
call fcn.00499b90
add esp, 0x18
cmp eax, ebx
jle 0x52ad33
xor ebx, ebx
jmp 0x52a88f
mov dword [esp + 0x10], esi
xor ebx, ebx
jmp 0x52a893
mov edi, dword [esp + 0x20]
test edi, edi
je 0x52ad61
mov edx, dword [ebp + 0x34]
push 0
push str.measuretext_end
push 2
push 0
push 0
push edx
call fcn.00499b90
add esp, 0x18
mov esi, edi
test esi, esi
je 0x52ad95
push esi
jmp 0x52ad8d
mov eax, dword [ebp + 0x34]
push ebx
push str.measuretext_end
push 2
push ebx
push ebx
push eax
call fcn.00499b90
add esp, 0x18
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x52ad95
mov ecx, eax
push ecx
call fcn.005d9fa3
add esp, 4
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x52ada8
mov edx, dword [esp + 0x90]
mov dword [esp + 0x30], edx
mov eax, dword [ebp + 0x30]
mov ecx, dword [ebp + 0x40]
mov eax, dword [eax]
cmp dword [ecx], eax
je 0x52adb6
mov dword [ecx], eax
mov ecx, dword [ebp + 0x28]
mov eax, dword [ecx]
mov ecx, dword [ebp + 0x44]
cmp dword [ecx], eax
jne 0x52add2
mov edx, dword [ebp + 0x48]
mov esi, dword [ebp + 0x2c]
mov edx, dword [edx]
cmp edx, dword [esi]
je 0x52ae90
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 0x52adf8
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 0x52ae0e
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 0x52ae32
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 0x52ae68
push eax
jmp 0x52ae6c
mov ecx, dword [ebp + 0x78]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
lea edx, [esp + 0xd0]
push edx
push ebx
mov dword [esi], eax
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov eax, dword [esp + 0xf0]
mov ecx, dword [ebp + 0x38]
mov dword [ecx], eax
mov eax, dword [esp + 0x58]
xor ecx, ecx
cmp eax, ecx
je 0x52aed1
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x50]
add eax, 0xfffffffe
cmp eax, edx
mov dword [esp + 0x58], ecx
jle 0x52aeb1
mov dword [esp + 0x50], eax
mov edx, dword [ebp + 0x64]
mov esi, dword [edx]
mov eax, 2
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x34], eax
add eax, esi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [ebp + 0x1c]
mov dword [esp + 0x18], eax
cmp dword [edx], ecx
mov dword [esp + 0x14], ecx
jne 0x52af16
mov eax, dword [ebp + 0x3c]
mov ecx, dword [esp + 0x30]
add eax, 0xfffffffe
cmp ecx, eax
jl 0x52aefc
mov ebx, 1
jmp 0x52a620
mov ebx, dword [esp + 0x48]
test ebx, ebx
jne 0x52a620
mov edi, dword [esp + 0x1c]
inc edi
mov dword [esp + 0x1c], edi
jmp 0x52a350
mov ecx, dword [ebp + 0x1c]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x48]
mov dword [ecx], 0
mov dword [esp + 0x18], 0xffffffff
jmp 0x52a350
mov edx, dword [ebp + 0x58]
mov eax, dword [esp + 0x38]
mov dword [edx], edi
mov edi, dword [esp + 0x50]
add eax, 0xfffffffe
cmp eax, edi
jle 0x52af4a
mov edi, eax
mov ecx, dword [ebp + 0x5c]
test cl, cl
jns 0x52af7f
mov eax, dword [ebp + 0x7c]
test eax, eax
je 0x52af7f
mov esi, dword [ebp + 0x68]
mov edx, dword [ebp + 0x44]
mov dword [eax], esi
cmp dword [edx], 0
je 0x52af7f
xor edx, edx
cmp esi, 0x190
setne dl
dec edx
and edx, 0x12c
add edx, 0x190
mov dword [eax], edx
test cl, 8
je 0x52af92
mov eax, dword [esp + 0x64]
test eax, eax
je 0x52af92
mov edi, dword [ebp + 0x3c]
add edi, 0xfffffffe
test cl, 1
je 0x52afb9
test cl, 2
je 0x52afb0
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