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

Disassembly:
sub esp, 0x70
mov eax, dword [0x56a8e0]
xor eax, esp
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x78]
push ebx
push ebp
mov ebp, dword [esp + 0x84]
push esi
mov esi, dword [esp + 0x80]
push edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x90]
mov ebx, edx
mov edx, dword [eax + 0x10]
push 0xfffffffffffffff0
xor edi, edi
push edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x3c], edi
call dword [sym.imp.USER32.dll_GetWindowLongA]
and eax, 0x1f
cmp ebx, edi
je 0x501af7
mov ecx, dword [ebx]
cmp ecx, edi
je 0x501af7
cmp esi, edi
je 0x501779
cmp ecx, esi
je 0x501779
cmp dword [ecx + 0x20], edi
je 0x50176c
mov edx, dword [ecx + 0x50]
mov dword [esp + 0x14], edx
mov ecx, dword [ecx + 0x50]
cmp ecx, esi
jne 0x501760
cmp dword [esp + 0x14], edi
jne 0x50177d
mov dword [esp + 0x14], esi
mov ecx, dword [ebx]
xor esi, esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x10], edi
cmp ecx, dword [esp + 0x14]
je 0x5017dc
mov edx, dword [ecx + 0x40]
cmp edx, 1
je 0x5017cf
cmp edx, 2
je 0x5017cf
mov edx, dword [ecx + 0x1c]
mov ebx, dword [ecx + 0x14]
add edx, ebx
cmp edx, esi
jle 0x5017b2
mov dword [esp + 0x30], edx
mov esi, edx
mov edx, dword [ecx + 0x18]
cmp edx, dword [esp + 0x2c]
jle 0x5017bf
mov dword [esp + 0x2c], edx
mov edx, dword [ecx + 0x10]
cmp edx, dword [esp + 0x34]
jle 0x5017cc
mov dword [esp + 0x34], edx
add edi, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x50]
cmp ecx, dword [esp + 0x14]
jne 0x501793
mov dword [esp + 0x10], edi
mov ecx, dword [esp + 0x18]
mov ebx, dword [ecx]
add ebx, esi
cmp dword [esp + 0x94], 0
mov dword [esp + 0x1c], ebx
je 0x50187c
mov edx, dword [esp + 0x24]
mov ecx, dword [edx]
cmp dword [ecx + 0x38], 0
je 0x501807
mov eax, 1
sub eax, 1
je 0x501829
sub eax, 1
je 0x50181e
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 4]
mov dword [esp + 0x10], ecx
jmp 0x501842
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 8]
sub eax, edi
jmp 0x50183e
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
sub eax, ecx
sub eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, ecx
mov dword [esp + 0x10], eax
push 0x3c
lea ecx, [esp + 0x44]
push 0
push ecx
call fcn.004948b0
mov edx, dword [esp + 0x34]
mov eax, dword [edx]
add esp, 0xc
test eax, eax
jne 0x50186e
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 8]
lea eax, [esp + 0x40]
push eax
push 0x3c
push edx
jmp 0x501876
lea ecx, [esp + 0x40]
push ecx
push 0x3c
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
mov edx, dword [esp + 0x24]
mov esi, dword [edx]
cmp esi, dword [esp + 0x14]
je 0x501a02
lea esp, [esp]
cmp dword [esp + 0x94], 0
je 0x5019f5
mov eax, dword [esi + 0x40]
mov dword [esp + 0x38], 0xffffffff
cmp eax, 1
je 0x5019f5
cmp eax, 2
je 0x5019f5
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
push ecx
lea ebx, [esi + 0x24]
push ebx
push ebp
lea edi, [esp + 0x4c]
call fcn.00501000
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x2c]
mov dword [edx], eax
mov eax, dword [esi + 0x3c]
add esp, 0xc
cmp eax, dword [edi]
je 0x5018f0
push eax
push ebp
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x44]
test eax, eax
je 0x50191a
mov ecx, dword [esp + 0x34]
mov edx, dword [esi + 0xc]
push ecx
mov ecx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x18]
push ecx
push edx
push eax
mov eax, dword [edi + 0x14]
push eax
call fcn.005034e0
add esp, 0x18
mov dword [edi + 0x14], eax
mov eax, dword [esi + 0x48]
test eax, eax
je 0x501946
mov ecx, dword [edi + 0x1c]
push ecx
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x24]
lea edx, [edi + 0x18]
push edx
mov edx, dword [edi + 0x10]
push eax
push ecx
push ebp
push edx
call fcn.00500630
add esp, 0x1c
jmp 0x5019d9
mov edx, dword [esi + 4]
mov eax, edx
lea edi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x501950
mov ecx, dword [esp + 0x10]
sub eax, edi
sar eax, 1
push eax
mov eax, dword [esp + 0x20]
push edx
push eax
push ecx
push ebp
call dword [sym.imp.GDI32.dll_TextOutW]
cmp dword [esi + 0x2c], 3
jne 0x5019d9
mov edx, dword [esi + 0x3c]
xor eax, eax
cmp dword [ebx], 0x1f4
push edx
setg al
inc eax
push eax
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
mov ebx, eax
push ebx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, dword [esp + 0x1c]
sub edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
push 0
push edi
push ecx
push ebp
mov dword [esp + 0x4c], eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov edx, dword [esi + 0xc]
add edx, dword [esp + 0x10]
push edi
push edx
push ebp
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x3c]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [esp + 0x38]
cmp eax, 0xffffffff
je 0x5019ea
push eax
push ebp
call dword [sym.imp.GDI32.dll_SetTextColor]
mov ecx, dword [esi + 0xc]
add dword [esp + 0x10], ecx
mov ebx, dword [esp + 0x1c]
mov esi, dword [esi + 0x50]
cmp esi, dword [esp + 0x14]
jne 0x501890
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x20]
lea eax, [ebx + edx]
mov ebx, dword [esp + 0x18]
push eax
mov dword [ebx], eax
call fcn.00500bd0
mov eax, dword [esp + 0x28]
mov esi, dword [eax]
mov edi, dword [esp + 0x18]
add esp, 4
cmp esi, edi
je 0x501a9a
lea ebx, [ebx]
mov eax, dword [esi + 0x40]
cmp eax, 1
je 0x501a3d
cmp eax, 2
jne 0x501a5a
mov ecx, dword [esp + 0x94]
mov ebx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
push ecx
push ebp
call fcn.00501630
mov edi, dword [esp + 0x1c]
add esp, 8
mov edx, dword [esi + 0x30]
mov ebx, dword [esi + 0x50]
push edx
call fcn.004fe690
mov eax, dword [esi + 0x44]
push eax
call fcn.004fe5e0
mov ecx, dword [esi + 0x48]
push ecx
call fcn.004fe5e0
mov eax, dword [esi + 4]
add esp, 0xc
test eax, eax
je 0x501a8b
push eax
call fcn.004934fd
add esp, 4
push esi
call fcn.004934fd
add esp, 4
mov esi, ebx
cmp ebx, edi
jne 0x501a30
mov edx, dword [esp + 0x24]
mov dword [edx], edi
test edi, edi
je 0x501af7
mov eax, dword [edi + 0x40]
mov dword [edi + 8], 0
cmp eax, 1
je 0x501abd
cmp eax, 2
je 0x501abd
mov edx, dword [edi + 0xc]
jmp 0x501abf
xor edx, edx
mov ecx, dword [edi + 0x50]
mov eax, edi
test ecx, ecx
je 0x501af9
mov eax, dword [ecx + 0x40]
cmp eax, 1
je 0x501adb
cmp eax, 2
je 0x501adb
mov dword [ecx + 8], edx
add edx, dword [ecx + 0xc]
mov eax, ecx
mov ecx, dword [ecx + 0x50]
test ecx, ecx
jne 0x501ac8
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.00493d56
add esp, 0x70
ret
xor eax, eax
mov ecx, dword [esp + 0x7c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00493d56
add esp, 0x70
ret