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

Disassembly:
push 0xffffffffffffffff
push 0x5a8581
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x248
mov dword [esp + 0x10], ecx
call fcn.00533b86
test al, al
je 0x522895
push ebx
push ebp
push esi
mov esi, dword [esp + 0x264]
push edi
xor edi, edi
xor bl, bl
cmp esi, edi
jne 0x5225d0
push edi
call dword [sym.imp.user32.dll_GetDC]
mov esi, eax
mov bl, 1
push esi
call dword [sym.imp.gdi32.dll_CreateCompatibleDC]
test bl, bl
mov ebp, eax
je 0x5225e5
push esi
push edi
call dword [sym.imp.user32.dll_ReleaseDC]
push 0x3c
push 1
call dword [sym.imp.msvcrt.dll_calloc]
mov esi, eax
mov eax, dword [esp + 0x284]
push 0x1f
push eax
lea ecx, [esi + 0x1c]
mov dword [esp + 0x50], esi
push ecx
mov byte [esi + 0x17], 1
mov byte [esi + 0x18], 0
mov byte [esi + 0x19], 0
mov byte [esi + 0x1a], 2
mov byte [esi + 0x1b], 0
call dword [sym.imp.msvcrt.dll__mbsnbcpy]
mov edx, dword [esp + 0x294]
mov eax, dword [esp + 0x298]
mov cl, byte [esp + 0x29c]
add esp, 0x14
mov dword [esi], edx
mov dl, byte [esp + 0x28c]
push esi
mov dword [esi + 0x10], eax
mov byte [esi + 0x14], cl
mov byte [esi + 0x15], dl
call dword [sym.imp.gdi32.dll_CreateFontIndirectA]
cmp eax, edi
mov dword [esp + 0x44], eax
jne 0x52265e
push 0x11
call dword [sym.imp.gdi32.dll_GetStockObject]
push eax
push ebp
call dword [sym.imp.gdi32.dll_SelectObject]
push 0xffffff
push ebp
mov dword [esp + 0x1c], eax
call dword [sym.imp.gdi32.dll_SetTextColor]
push edi
push ebp
call dword [sym.imp.gdi32.dll_SetBkColor]
push 2
push ebp
call dword [sym.imp.gdi32.dll_SetBkMode]
mov edx, dword [esp + 0x274]
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x24]
dec ecx
push 0x400
push eax
push ecx
push edx
push ebp
mov dword [esp + 0x30], ecx
call dword [sym.imp.user32.dll_DrawTextA]
mov al, byte [esi + 0x14]
mov ebx, dword [esp + 0x30]
test al, al
je 0x5226d0
add dword [esp + 0x2c], ebx
mov esi, dword [esp + 0x2c]
xor eax, eax
push eax
lea edx, [esp + 0x40]
mov ecx, 0xa
lea edi, [esp + 0x4c]
push eax
push edx
rep stosd dword es:[edi], eax
push eax
lea eax, [esp + 0x58]
mov ecx, esi
push eax
push ebp
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x60], 0x28
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ebx
mov word [esp + 0x6c], 1
mov word [esp + 0x6e], 0x18
call dword [sym.imp.gdi32.dll_CreateDIBSection]
push eax
push ebp
mov dword [esp + 0x3c], eax
call dword [sym.imp.gdi32.dll_SelectObject]
lea ecx, [esi + esi*2]
mov dword [esp + 0x38], eax
mov edi, dword [esp + 0x3c]
push 0
lea eax, [ecx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
mov ecx, eax
xor eax, eax
sar ecx, 5
imul ecx, ebx
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x278]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push eax
push ecx
push edx
push ebp
call dword [sym.imp.user32.dll_DrawTextA]
push 0
lea ecx, [esp + 0x78]
call fcn.0051ab96
mov eax, dword [esp + 0x34]
push 0
push eax
lea ecx, [esp + 0x7c]
mov dword [esp + 0x268], 0
call fcn.005212c6
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x270]
mov eax, dword [esp + 0x10]
mov esi, dword [ecx + 0x10]
sub esi, ebx
xor ebx, ebx
sub esi, edx
dec esi
test eax, eax
jle 0x522818
mov eax, dword [esp + 0x18]
xor edi, edi
test eax, eax
jle 0x52280f
push 1
push edi
lea edx, [esp + 0x24]
push ebx
push edx
lea ecx, [esp + 0x84]
call fcn.0052a106
cmp byte [eax], 0
je 0x522806
mov eax, dword [esp + 0x290]
mov ecx, dword [esp + 0x278]
push eax
mov eax, dword [esp + 0x270]
push ecx
lea edx, [edi + esi]
lea ecx, [ebx + eax]
push edx
push ecx
mov ecx, dword [esp + 0x30]
call fcn.0052a456
mov eax, dword [esp + 0x18]
inc edi
cmp edi, eax
jl 0x5227c4
mov eax, dword [esp + 0x10]
inc ebx
cmp ebx, eax
jl 0x5227ba
mov eax, dword [esp + 0x14]
test eax, eax
je 0x522828
push eax
push ebp
call dword [sym.imp.gdi32.dll_SelectObject]
mov edx, dword [esp + 0x44]
mov esi, dword [sym.imp.gdi32.dll_DeleteObject]
push edx
call esi
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.msvcrt.dll_free]
mov ecx, dword [esp + 0x3c]
add esp, 4
push ecx
push ebp
call dword [sym.imp.gdi32.dll_SelectObject]
push eax
call esi
push ebp
call dword [sym.imp.gdi32.dll_DeleteDC]
lea ecx, [esp + 0x74]
mov dword [esp + 0x260], 0xffffffff
mov dword [esp + 0x74], 0x6abb34
call fcn.0051abb6
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x248]
mov dword fs:[0], ecx
add esp, 0x254
ret 0x2c
mov ecx, dword [esp + 0x248]
xor eax, eax
mov dword fs:[0], ecx
add esp, 0x254
ret 0x2c