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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x54]
test esi, esi
je 0x5150bd
mov eax, esi
xor edx, edx
call fcn.00546bf0
test al, al
jne 0x5150cc
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.00519878
jmp 0x515b18
mov eax, dword [ebx]
mov edx, dword [0x5c11b0]
cmp eax, dword [edx]
jne 0x51521a
movzx eax, word [ebx + 6]
cmp eax, 0x17
jg 0x515101
je 0x51517d
sub eax, 3
je 0x5151ef
sub eax, 3
je 0x51512f
dec eax
je 0x515114
jmp 0x515762
sub eax, 0x1a
je 0x5151dc
sub eax, 0x22
je 0x515120
jmp 0x515762
mov dword [ebx + 0xc], 1
jmp 0x515b18
mov eax, dword [0x5c1738]
mov eax, dword [eax]
mov dword [ebx + 0xc], eax
jmp 0x515b18
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x54]
cmp byte [esi + 0x10], 0
je 0x515762
mov byte [esi + 0x10], 0
mov eax, esi
call fcn.005464a8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x54]
mov byte [edx + 0x10], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
cmp byte [eax + 0x10], 0
jne 0x515762
push 0x585
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_RedrawWindow
jmp 0x515762
mov eax, dword [ebp - 4]
add eax, 0x2c
push eax
mov eax, dword [ebp - 4]
add eax, 0x1c
push eax
mov eax, dword [ebp - 4]
add eax, 0x24
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 4]
lea ecx, [eax + 0xc]
mov eax, dword [ebp - 4]
lea edx, [eax + 0x3c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
call fcn.0050f404
mov eax, dword [ebp - 4]
mov cl, byte [eax + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x4c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.00510264
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov ecx, dword [ebp - 4]
xor edx, edx
call fcn.0050fd20
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebx + 8]
mov dword [edx], eax
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.00546494
cmp eax, dword [ebx + 8]
jne 0x515762
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.00519878
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0xc]
jmp 0x515b18
cmp eax, 0x85
jg 0x51523e
je 0x5155e5
sub eax, 0xf
je 0x515541
sub eax, 5
je 0x5154bf
jmp 0x515762
sub eax, 0x317
je 0x515255
sub eax, 0xacf7
je 0x515495
jmp 0x515762
mov eax, dword [ebp - 4]
add eax, 0x2c
push eax
mov eax, dword [ebp - 4]
add eax, 0x1c
push eax
mov eax, dword [ebp - 4]
add eax, 0x24
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 4]
lea ecx, [eax + 0xc]
mov eax, dword [ebp - 4]
lea edx, [eax + 0x3c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
call fcn.0050f404
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
xor edx, edx
call fcn.00546bec
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x54]
mov al, 1
mov byte [edx + 0x2d], al
mov edx, dword [ebx + 4]
mov dword [ebp - 8], edx
test al, al
je 0x5152da
mov eax, dword [ebp - 4]
cmp byte [eax + 0x59], 0
jne 0x5152bb
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
test eax, eax
je 0x515b18
mov edx, dword [ebp - 4]
mov cl, byte [edx + 4]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x4c]
call fcn.00510264
mov eax, dword [ebp - 4]
cmp byte [eax + 4], 0
jne 0x5152f3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov ecx, dword [ebp - 4]
xor edx, edx
call fcn.0050fd20
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
call dword [edx + 0x2c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
call fcn.0043437c
call fcn.0042f800
push eax
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x80]
push eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.0052fe68
mov eax, dword [ebx + 8]
push eax
push 0xffffffffffffffff
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebx + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x4c]
mov eax, dword [ebp - 4]
call fcn.00510d9c
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 8]
push eax
call sub.gdi32.dll_SaveDC
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x80]
mov ecx, eax
mov edx, eax
mov eax, dword [ebp - 8]
call fcn.00463790
mov eax, dword [ebp - 4]
mov edi, dword [eax + 0x74]
mov eax, edi
xor ecx, ecx
mov edx, 1
call fcn.00510a34
xor edx, edx
mov dl, byte [edi + 6]
imul edx
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
call dword [edx + 0x20]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x80]
add edx, edx
sub eax, edx
pop edx
sub eax, edx
push eax
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x78]
mov eax, esi
xor ecx, ecx
mov edx, 1
call fcn.00510a34
xor edx, edx
mov dl, byte [esi + 6]
imul edx
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x80]
add edx, edx
sub eax, edx
pop edx
sub eax, edx
push eax
push 0
push 0
mov eax, dword [ebp - 8]
push eax
call sub.gdi32.dll_IntersectClipRect
push 0
mov eax, dword [ebp - 8]
push eax
push 0x14
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov esi, dword [eax + 0x30]
test esi, esi
je 0x515458
mov eax, esi
mov edx, dword [0x5b40c8]
call fcn.00404444
test al, al
je 0x515458
mov eax, dword [esi + 0x218]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
je 0x51546c
push 0
mov eax, dword [ebp - 8]
push eax
push 0xf
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_SendMessageA
jmp 0x51546c
push 0
mov eax, dword [ebp - 8]
push eax
push 0xf
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_SendMessageA
push 0x24
mov eax, dword [ebp - 8]
push eax
push 0x318
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_SendMessageA
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.gdi32.dll_RestoreDC
jmp 0x515762
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
cmp byte [eax + 0x10], 0
jne 0x515762
push 0x405
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_RedrawWindow
jmp 0x515762
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x515762
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.005464a8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x54]
mov byte [edx + 0x10], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
cmp byte [eax + 0x10], 0
jne 0x515b18
mov eax, dword [ebp - 4]
cmp byte [eax + 0x59], 0
jne 0x515508
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, dword [0x5c1374]
cmp dword [eax], 6
jl 0x515762
mov eax, dword [0x5c11d0]
cmp byte [eax], 0
je 0x515762
mov eax, dword [ebx + 4]
mov edx, dword [0x5c13ac]
cmp eax, dword [edx]
je 0x515762
mov dword [ebx + 0xc], 1
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x515762
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.005464a8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x54]
mov byte [edx + 0x10], al
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
cmp byte [eax + 0x10], 0
jne 0x515589
mov eax, dword [0x5c11d0]
cmp byte [eax], 0
je 0x5155ae
mov eax, dword [0x5c13ac]
cmp dword [eax], 0
jne 0x5155ae
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_BeginPaint
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_EndPaint
jmp 0x515b18
mov eax, dword [ebx + 8]
push eax
push 0xffffffffffffffff
mov esi, dword [ebx + 4]
push esi
mov ecx, esi
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x4c]
mov eax, dword [ebp - 4]
call fcn.00510d9c
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 0x59], 0
jne 0x515762
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0xc]
jmp 0x515762
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x515762
mov eax, dword [0x5c11d0]
cmp byte [eax], 0
jne 0x515b18
mov eax, dword [ebp - 4]
add eax, 0x2c
push eax
mov eax, dword [ebp - 4]
add eax, 0x1c
push eax
mov eax, dword [ebp - 4]
add eax, 0x24
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 4]
lea ecx, [eax + 0xc]
mov eax, dword [ebp - 4]
lea edx, [eax + 0x3c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
call fcn.0050f404
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x54]
mov eax, esi
call fcn.005464a8
mov edx, eax
mov eax, esi
call fcn.00546bec
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.005464a8
test al, al
jne 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
cmp byte [eax + 0x2d], 0
je 0x515697
mov eax, dword [ebp - 4]
cmp byte [eax + 0x59], 0
jne 0x515680
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0xc]
mov eax, dword [ebp - 4]
mov cl, byte [eax + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x4c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.00510264
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_GetWindowDC
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
push eax
call sub.gdi32.dll_SaveDC
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x51575b
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 8], 0
je 0x515712
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
call dword [edx + 0x2c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x38]
call fcn.0043437c
call fcn.0042f800
push eax
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x80]
push eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.0052fe68
mov eax, dword [ebx + 8]
push eax
push 0xffffffffffffffff
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebx + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x4c]
mov eax, dword [ebp - 4]
call fcn.00510d9c
mov dword [ebx + 0xc], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x515b18
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.gdi32.dll_RestoreDC
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_ReleaseDC
ret
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.00519878
mov eax, dword [ebx]
cmp eax, 0x18e
jg 0x5157ce
je 0x515815
cmp eax, 0xc2
jg 0x5157a6
je 0x51587c
sub eax, 5
je 0x5158a7
sub eax, 2
je 0x5159ff
dec eax
je 0x515a98
jmp 0x515b18
add eax, 0xffffff00
sub eax, 2
jb 0x51588b
add eax, 0xffffff82
sub eax, 2
jb 0x51587c
sub eax, 4
je 0x51586d
jmp 0x515b18
cmp eax, 0xb013
jg 0x5157fb
je 0x515958
sub eax, 0x197
je 0x51587c
sub eax, 0x69
je 0x5158d5
dec eax
je 0x51588b
jmp 0x515b18
sub eax, 0xb014
je 0x5159b7
add eax, 0xfffff314
sub eax, 2
jb 0x51588b
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov esi, dword [eax + 0x30]
test esi, esi
je 0x515b18
mov eax, esi
mov edx, dword [0x5b40c8]
call fcn.00404444
test al, al
je 0x515b18
cmp dword [ebx + 0xc], 0
jne 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x218]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jne 0x515b18
mov dword [ebx + 0xc], 0xffffffff
jmp 0x515b18
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.005101a8
jmp 0x515b18
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.005101a8
jmp 0x515b18
mov eax, dword [ebp - 4]
cmp byte [eax + 0x58], 0
jne 0x515b18
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.005101a8
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x515b18
push 0
push 0
push 0x85
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_SendMessageA
jmp 0x515b18
mov eax, dword [0x5c15b4]
cmp dword [eax], 0
je 0x515b18
mov eax, dword [0x5c15b4]
mov eax, dword [eax]
test byte [eax + 0x1c], 0x10
jne 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
push eax
call sub.user32.dll_IsWindowEnabled
test eax, eax
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x4c]
mov edx, dword [0x5c15b4]
mov edx, dword [edx]
cmp eax, dword [edx + 0x78]
je 0x515929
mov edx, eax
mov eax, dword [0x5c15b4]
mov eax, dword [eax]
call fcn.00553ee4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.005464a8
test al, al
jne 0x515b18
call sub.user32.dll_GetCapture
test eax, eax
je 0x515b18
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.005101a8
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.0050f2e0
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov byte [eax + 0x45], 1
cmp dword [eax + 0x40], 0xe3
jne 0x515987
xor ecx, ecx
xor edx, edx
call fcn.005456e4
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x54]
cmp dword [ebx + 0x30], 0
je 0x515b18
mov byte [ebx + 0x2d], 1
push 0
push 0
push 0x85
mov eax, dword [ebx + 0x30]
call fcn.0046b674
push eax
call sub.user32.dll_SendMessageA
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.0050f2e0
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x54]
mov byte [ebx + 0x45], 0
cmp dword [ebx + 0x30], 0
je 0x5159f5
mov byte [ebx + 0x2d], 1
push 0
push 0
push 0x85
mov eax, dword [ebx + 0x30]
call fcn.0046b674
push eax
call sub.user32.dll_SendMessageA
call fcn.0052b774
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.0050f2e0
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
cmp dword [eax + 0x30], 0
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x30]
mov edx, dword [0x460be0]
call fcn.00404444
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x30]
mov si, 0xffb8
call fcn.004044b4
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x30]
cmp byte [eax + 0x1a4], 0
je 0x515b18
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x54]
mov byte [ebx + 0x2d], 1
mov byte [ebx + 0x44], 1
push 0
push 0
push 0x85
mov eax, dword [ebx + 0x30]
call fcn.0046b674
push eax
call sub.user32.dll_SendMessageA
jmp 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
call fcn.0050f2e0
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
cmp dword [eax + 0x30], 0
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x30]
mov edx, dword [0x460be0]
call fcn.00404444
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x30]
mov si, 0xffb8
call fcn.004044b4
test al, al
je 0x515b18
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x54]
mov eax, dword [eax + 0x30]
cmp byte [eax + 0x1a4], 0
je 0x515b18
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x54]
mov byte [ebx + 0x2d], 1
mov byte [ebx + 0x44], 0
push 0
push 0
push 0x85
mov eax, dword [ebx + 0x30]
call fcn.0046b674
push eax
call sub.user32.dll_SendMessageA
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret