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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x577aab
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
push ebx
push esi
push edi
mov eax, dword [0x5c3678]
xor eax, esp
push eax
lea eax, [esp + 0xc8]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], ebx
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
mov edx, dword [ebx]
mov eax, dword [edx + 0x1c]
call eax
mov esi, dword [ebx + 0x64]
sub esi, dword [ebx + 0x60]
xor edi, edi
sar esi, 2
test esi, esi
jbe 0x4afa6f
mov ecx, dword [ebx + 0x64]
sub ecx, dword [ebx + 0x60]
sar ecx, 2
cmp edi, ecx
jb 0x4afa59
call fcn.0053d6a6
mov edx, dword [ebx + 0x60]
mov ecx, dword [edx + edi*4]
test ecx, ecx
je 0x4afa6a
mov eax, dword [ecx]
mov edx, dword [eax + 0x34]
call edx
inc edi
cmp edi, esi
jb 0x4afa47
mov eax, dword [ebx + 0x7c]
sub eax, dword [ebx + 0x78]
xor edi, edi
sar eax, 2
mov dword [esp + 0x1c], eax
test eax, eax
jbe 0x4afabc
mov eax, dword [ebx + 0x7c]
sub eax, dword [ebx + 0x78]
sar eax, 2
cmp edi, eax
jb 0x4afa94
call fcn.0053d6a6
mov ecx, dword [ebx + 0x78]
mov esi, dword [ecx + edi*4]
push esi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4afab5
push 0
push 0
push 0x785
push esi
call dword [sym.imp.USER32.dll_PostMessageW]
inc edi
cmp edi, dword [esp + 0x1c]
jb 0x4afa82
lea eax, [ebx + 0x10c]
push eax
lea edx, [esp + 0x90]
push edx
call fcn.004b09f0
xor esi, esi
mov eax, ebx
mov dword [esp + 0xd0], esi
call fcn.004ae120
mov dword [esp + 0x3c], esi
jmp 0x4afaf0
mov eax, dword [esp + 0x3c]
lea eax, [eax + eax*2]
lea esi, [ebx + eax*8 + 0xbc]
mov eax, dword [esi + 0x10]
mov dword [esp + 0x58], eax
cmp dword [esi + 0xc], eax
jbe 0x4afb0f
call fcn.0053d6a6
mov edi, dword [esi + 0xc]
mov ecx, dword [esi]
mov dword [esp + 0x74], ecx
cmp edi, dword [esi + 0x10]
jbe 0x4afb22
call fcn.0053d6a6
mov esi, dword [esi]
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], edi
lea esp, [esp]
test esi, esi
je 0x4afb3a
cmp esi, dword [esp + 0x74]
je 0x4afb3f
call fcn.0053d6a6
cmp edi, dword [esp + 0x58]
je 0x4affca
test esi, esi
jne 0x4afceb
call fcn.0053d6a6
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x4afb62
call fcn.0053d6a6
mov edi, dword [edi]
mov dword [esp + 0x20], edi
test edi, edi
je 0x4afb74
mov edx, dword [edi]
mov eax, dword [edx + 4]
push edi
call eax
xor eax, eax
mov byte [esp + 0xd0], 1
cmp edi, eax
je 0x4aff8b
lea ecx, [esp + 0x48]
push ecx
push ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov eax, esp
mov dword [eax], edi
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov dword [esp + 0x24], esp
push edi
call eax
call fcn.004ac160
add esp, 8
cmp al, 1
jne 0x4aff72
xor eax, eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0xb8]
push edx
lea esi, [esp + 0x94]
mov byte [esp + 0x1f], 0
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
call fcn.004b0af0
mov esi, dword [eax]
mov ebx, dword [eax + 4]
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x80], eax
test esi, esi
je 0x4afc04
cmp esi, dword [esp + 0x8c]
je 0x4afc09
call fcn.0053d6a6
cmp ebx, dword [esp + 0x80]
je 0x4afdf8
test esi, esi
jne 0x4afcf2
call fcn.0053d6a6
cmp ebx, dword [esi + 0x18]
jne 0x4afc2d
call fcn.0053d6a6
lea eax, [ebx + 0x14]
push eax
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x4afdf3
push edi
lea edi, [esp + 0x60]
call fcn.0049f300
test byte [0x5d1200], 1
jne 0x4afcf9
or dword [0x5d1200], 1
mov ebx, 0x60
mov dword [0x5d1204], 0x64
mov dword [0x5d1208], ebx
mov dword [0x5d120c], ebx
mov byte [0x5d1210], 0
call fcn.00403ca0
test al, al
jne 0x4afcf9
push 0
mov byte [0x5d1210], 1
mov edi, ebx
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
test esi, esi
je 0x4afcc3
push 0x58
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push esi
push 0
mov edi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MulDiv]
push 0x64
push edi
mov dword [0x5d120c], edi
call ebx
mov ecx, eax
mov dword [0x5d1204], ecx
cmp ecx, 0x64
jne 0x4afd05
mov byte [0x5d1210], 0
jmp 0x4afd05
mov eax, dword [esi]
jmp 0x4afb58
mov esi, dword [esi]
jmp 0x4afc23
mov ecx, dword [0x5d1204]
mov ebx, dword [sym.imp.KERNEL32.dll_MulDiv]
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
sub eax, esi
sub edi, edx
cmp byte [0x5d1210], 0
mov dword [esp + 0x1c], eax
je 0x4afd89
cmp ecx, 0x64
je 0x4afd41
push 0x64
push ecx
push edx
call ebx
mov ecx, dword [0x5d1204]
mov esi, dword [esp + 0x30]
mov edx, eax
mov dword [esp + 0x2c], edx
cmp byte [0x5d1210], 0
je 0x4afd89
cmp ecx, 0x64
je 0x4afd65
push 0x64
push ecx
push esi
call ebx
mov ecx, dword [0x5d1204]
mov edx, dword [esp + 0x2c]
mov esi, eax
mov dword [esp + 0x30], esi
cmp byte [0x5d1210], 0
je 0x4afd89
cmp ecx, 0x64
je 0x4afd89
push 0x64
push ecx
push edi
call ebx
mov ecx, dword [0x5d1204]
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
jmp 0x4afd8b
mov eax, edi
add eax, edx
cmp byte [0x5d1210], 0
mov dword [esp + 0x34], eax
je 0x4afdb3
cmp ecx, 0x64
je 0x4afdb3
mov eax, dword [esp + 0x1c]
push 0x64
push ecx
push eax
call ebx
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
jmp 0x4afdb7
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x5c]
mov edi, ecx
sub edi, edx
mov dword [esp + 0x40], edi
mov edi, dword [esp + 0x60]
mov ebx, edi
sub ebx, esi
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x64]
sub ebx, dword [esp + 0x34]
add eax, esi
sub ebx, ecx
mov ecx, dword [esp + 0x68]
sub ecx, eax
add ebx, edx
sub ecx, edi
add ecx, esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ecx
mov byte [esp + 0x17], 1
mov edi, dword [esp + 0x18]
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0xc0]
add edi, 0x10c
push eax
mov esi, edi
call fcn.004b0af0
mov esi, dword [eax]
mov ecx, dword [edi + 0x18]
mov ebx, dword [eax + 4]
mov edi, dword [edi]
mov dword [esp + 0x88], ecx
test esi, esi
je 0x4afe2f
cmp esi, edi
je 0x4afe34
call fcn.0053d6a6
cmp ebx, dword [esp + 0x88]
je 0x4afeb5
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x44]
push eax
test esi, esi
jne 0x4afead
call fcn.0053d6a6
xor eax, eax
cmp ebx, dword [eax + 0x18]
jne 0x4afe5c
call fcn.0053d6a6
mov edi, dword [esp + 0x28]
lea ecx, [ebx + 0x14]
push ecx
push ecx
mov eax, esp
mov dword [eax], edi
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov dword [esp + 0x2c], esp
push edi
call eax
call fcn.004ae380
test esi, esi
jne 0x4afeb1
call fcn.0053d6a6
cmp ebx, dword [esi + 0x18]
jne 0x4afe8d
call fcn.0053d6a6
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0x4c]
add ebx, 0x24
push ebx
push edx
mov eax, edi
call fcn.0049fcc0
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
jmp 0x4aff87
mov eax, dword [esi]
jmp 0x4afe52
mov esi, dword [esi]
jmp 0x4afe83
cmp byte [esp + 0x17], 1
jne 0x4aff72
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0xb0]
add esi, 0xec
push ecx
call fcn.004b0af0
mov edi, dword [eax]
mov edx, dword [esi + 0x18]
mov ebx, dword [eax + 4]
mov esi, dword [esi]
mov dword [esp + 0x70], edx
test edi, edi
je 0x4afef2
cmp edi, esi
je 0x4afef7
call fcn.0053d6a6
cmp ebx, dword [esp + 0x70]
je 0x4aff72
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x44]
push ecx
test edi, edi
jne 0x4aff6a
call fcn.0053d6a6
xor eax, eax
cmp ebx, dword [eax + 0x18]
jne 0x4aff1c
call fcn.0053d6a6
mov esi, dword [esp + 0x28]
lea edx, [ebx + 0x14]
push edx
push ecx
mov eax, esp
mov dword [eax], esi
mov eax, dword [esi]
mov ecx, dword [eax + 4]
mov dword [esp + 0x2c], esp
push esi
call ecx
call fcn.004ae380
test edi, edi
jne 0x4aff6e
call fcn.0053d6a6
cmp ebx, dword [edi + 0x18]
jne 0x4aff4d
call fcn.0053d6a6
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0x4c]
add ebx, 0x24
push ebx
push eax
mov eax, esi
call fcn.0049fcc0
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
jmp 0x4aff87
mov eax, dword [edi]
jmp 0x4aff12
mov edi, dword [edi]
jmp 0x4aff43
mov ebx, dword [esp + 0x18]
mov ecx, dword [ebx + 0x4c]
mov edi, dword [esp + 0x20]
push 0
push ecx
mov eax, edi
call fcn.0049fcc0
mov esi, dword [esp + 0x24]
mov byte [esp + 0xd0], 0
test edi, edi
je 0x4aff9f
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
test esi, esi
jne 0x4affc6
call fcn.0053d6a6
xor eax, eax
mov ecx, dword [esp + 0x28]
cmp ecx, dword [eax + 0x10]
jb 0x4affb8
call fcn.0053d6a6
add dword [esp + 0x28], 4
mov edi, dword [esp + 0x28]
jmp 0x4afb30
mov eax, dword [esi]
jmp 0x4affaa
mov eax, dword [esp + 0x3c]
inc eax
cmp eax, 2
mov dword [esp + 0x3c], eax
jl 0x4afaf0
mov edx, dword [ebx]
mov eax, dword [edx + 0x20]
mov ecx, ebx
call eax
lea esi, [esp + 0x8c]
mov dword [esp + 0xd0], 2
call fcn.004b1630
mov ecx, dword [esp + 0x8c]
push ecx
call fcn.0053c152
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0xc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10