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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x34]
push edi
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x41510e
lea edi, [esp + 0x38]
mov dword [ebp + 0x10], edi
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x6c], ebx
je 0x4159af
push ebx
call dword [sym.imp.GDI32.dll_SaveDC]
test eax, eax
je 0x4159a8
mov eax, dword [esi + 0x14]
test eax, eax
je 0x41516c
mov eax, dword [esi + 4]
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
mov edx, dword [edi + 0xc]
push 0xcc0020
push eax
push ecx
sub edx, eax
push ebx
push edx
mov edx, dword [edi + 8]
sub edx, ecx
push edx
push eax
mov eax, dword [ebp + 0xc]
push ecx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4151dd
mov edx, dword [esi + 0x28]
mov ecx, dword [esp + 0x3c]
add edx, ecx
push edx
mov edx, dword [esp + 0x3c]
add eax, edx
push eax
push ecx
lea eax, [esp + 0x84]
push edx
push eax
call dword [sym.imp.USER32.dll_SetRect]
lea ecx, [esp + 0x78]
lea edx, [esp + 0x88]
push ecx
push edi
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x4151dd
mov eax, dword [esi + 8]
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x18]
mov eax, dword [esp + 0x3c]
push 0xcc0020
push 0
push 0
push ebx
push ecx
mov ecx, dword [esp + 0x4c]
push edx
mov edx, dword [ebp + 0xc]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esi + 0x20]
test eax, eax
je case.default.0x41581e
mov eax, dword [esi + 0x34]
test eax, eax
jl case.default.0x41581e
cmp eax, 3
jle 0x41579d
cmp eax, 4
jne case.default.0x41581e
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.GDI32.dll_SaveDC]
test eax, eax
je case.default.0x41581e
mov eax, dword [esi + 0x40]
xor edx, edx
test eax, eax
setg dl
dec edx
xor ecx, ecx
and edx, eax
mov ebx, dword [esi + 0x3c]
test eax, eax
setl cl
dec ecx
mov dword [esp + 0x48], edx
and eax, ecx
mov ecx, 0x168
sub ecx, ebx
sub eax, edx
imul eax, ecx
mov edi, dword [esi + 0x38]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
mov eax, 0x51eb851f
shl edx, 2
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ebx
mov dword [esp + 0x34], edx
cdq
sub eax, edx
sar eax, 1
test edi, edi
jge 0x415274
sub edi, eax
lea eax, [edi + edi*4]
jmp 0x415279
add eax, edi
lea eax, [eax + eax*4]
imul ecx, dword [esp + 0x48]
lea edi, [eax + eax*4]
mov eax, 0x51eb851f
lea ecx, [ecx + ecx*4]
mov ebx, dword [esp + 0x34]
shl edi, 2
lea ecx, [ecx + ecx*4]
shl ecx, 2
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
test edi, edi
jge 0x4152ac
sub edi, edx
sub edi, ebx
jmp 0x4152ae
add edi, edx
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x20]
test ebx, ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
jne 0x4152d1
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ebx, eax
jmp 0x415742
mov eax, edi
mov ecx, 0x8ca0
cdq
idiv ecx
xor eax, eax
cmp ebx, ecx
setge al
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, ebx
mov ebx, 0x8ca0
lea ecx, [ecx + ecx*8]
shl ecx, 5
mov edi, edx
cdq
idiv ebx
mov dword [esp + 0x48], edi
add ecx, edx
cmp ecx, ebx
jl 0x415322
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
push edx
push eax
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ebx, eax
jmp 0x415742
fld qword [0x4411d8]
fld1
lea eax, [ecx + edi]
mov ecx, 0x8ca0
fpatan
cdq
idiv ecx
sub esp, 8
fmul qword [0x4411d0]
fild dword [esp + 0x14]
fild dword [esp + 0x18]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fsqrt
fmul qword [0x4411c8]
fstp qword [esp + 0x68]
fstp st(0)
fstp st(0)
fild dword [esp + 0x50]
mov dword [esp + 0x50], edx
fmul st(1)
fmul qword [0x4411c0]
fstp qword [esp + 0x78]
fild dword [esp + 0x50]
fmul st(1)
fmul qword [0x4411c0]
fstp qword [esp + 0x50]
fstp st(0)
fld qword [esp + 0x78]
fcos
fmul qword [esp + 0x68]
fstp qword [esp]
call fcn.004364ae
call fcn.00436258
fld qword [esp + 0x78]
fsin
mov ebx, eax
mov dword [esp + 0x3c], ebx
fmul qword [esp + 0x68]
fstp qword [esp]
call fcn.004364ae
call fcn.00436258
fld qword [esp + 0x50]
fcos
mov dword [esp + 0x1c], eax
fmul qword [esp + 0x68]
fstp qword [esp]
call fcn.004364ae
call fcn.00436258
fld qword [esp + 0x50]
fsin
mov edi, eax
mov dword [esp + 0x20], edi
fmul qword [esp + 0x68]
fstp qword [esp]
call fcn.004364ae
add esp, 8
call fcn.00436258
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x58], eax
test ebx, ebx
mov edx, 2
jg 0x415424
test ecx, ecx
jle 0x415416
mov dword [esp + 0x5c], 1
jmp 0x415438
test ebx, ebx
jge 0x415424
test ecx, ecx
jg 0x415430
mov dword [esp + 0x5c], edx
jmp 0x415438
test ecx, ecx
mov dword [esp + 0x5c], 3
jl 0x415438
mov dword [esp + 0x5c], 0
test edi, edi
jge 0x41544c
test eax, eax
jl 0x41544a
mov dword [esp + 0x54], 1
jmp 0x41546c
test edi, edi
jg 0x415458
test eax, eax
jge 0x415464
mov dword [esp + 0x54], edx
jmp 0x41546c
test eax, eax
mov dword [esp + 0x54], 3
jle 0x41546c
mov dword [esp + 0x54], 0
mov edi, dword [sym.imp.GDI32.dll_CreateRectRgn]
push 0
push 0
push 0
push 0
call edi
mov edx, dword [esp + 0x10]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0xc]
push edx
push eax
push 0
push 0
call edi
mov dword [esp + 0x60], eax
xor eax, eax
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x5c]
add eax, ecx
and eax, 0x80000003
jns 0x4154ac
dec eax
or eax, 0xfffffffc
inc eax
cmp eax, 3
mov dword [esp + 0x70], eax
ja case.default.0x4154b9
jmp dword [eax*4 + 0x4159b8]
test ebx, ebx
jle 0x4154fd
mov eax, dword [esp + 0x14]
test eax, eax
jl 0x4154fd
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
cdq
sub eax, edx
mov ecx, eax
mov eax, edi
sar ecx, 1
lea edx, [ecx + ebx*2]
mov dword [esp + 0x1c], edx
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
add edx, edx
mov ebx, eax
sub ebx, edx
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x34]
jmp 0x415520
mov edi, dword [esp + 0xc]
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
lea eax, [ecx + edi*2]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x18]
test edx, edx
jl 0x415534
mov edx, dword [esp + 0x58]
test edx, edx
jg 0x41562c
lea edx, [edi + edi]
mov edi, eax
sub edi, edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edi
jmp 0x4156d7
test ebx, ebx
jg 0x41556c
mov edi, dword [esp + 0x14]
test edi, edi
jle 0x41556c
mov eax, dword [esp + 0xc]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x10]
sar ecx, 1
lea edx, [ecx + ebx*2]
mov dword [esp + 0x1c], edx
jmp 0x415581
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
cdq
sub eax, edx
mov ecx, eax
mov eax, edi
sar ecx, 1
mov dword [esp + 0x1c], ecx
cdq
sub eax, edx
lea edx, [edi + edi]
sar eax, 1
mov edi, eax
sub edi, edx
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x18]
test edi, edi
jge 0x4155a5
mov edx, dword [esp + 0x58]
test edx, edx
jge 0x415630
mov edx, dword [esp + 0xc]
mov edi, ecx
add edx, edx
sub edi, edx
mov dword [esp + 0x24], edi
jmp 0x4156d3
test ebx, ebx
jge 0x4155f5
mov eax, dword [esp + 0x14]
test eax, eax
jg 0x4155f5
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
cdq
sub eax, edx
mov ecx, eax
mov eax, edi
sar ecx, 1
lea edx, [ecx + ebx*2]
mov dword [esp + 0x1c], edx
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
add edx, edx
mov ebx, eax
sub ebx, edx
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x34]
jmp 0x41561c
mov edi, dword [esp + 0xc]
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
lea eax, [edi + edi]
mov edi, dword [esp + 0x10]
sar ecx, 1
mov edx, ecx
sub edx, eax
mov eax, edi
mov dword [esp + 0x1c], edx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x18]
test edx, edx
jg 0x415646
mov edx, dword [esp + 0x58]
test edx, edx
jge 0x415646
mov edi, dword [esp + 0x18]
lea edi, [ecx + edi*2]
add edx, edx
mov dword [esp + 0x24], edi
mov edi, eax
sub edi, edx
mov dword [esp + 0x28], edi
jmp 0x4156d7
lea edx, [eax + edi*2]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
jmp 0x4156d7
test ebx, ebx
jl 0x415693
mov eax, dword [esp + 0x14]
test eax, eax
jge 0x415693
mov edi, dword [esp + 0xc]
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x10]
sar ecx, 1
lea edx, [ecx + ebx*2]
mov dword [esp + 0x1c], edx
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
add edx, edx
mov ebx, eax
sub ebx, edx
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x34]
jmp 0x4156b8
mov edi, dword [esp + 0xc]
mov eax, edi
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x10]
cdq
sub eax, edx
mov edx, dword [esp + 0x10]
sar ecx, 1
sar eax, 1
mov dword [esp + 0x1c], ecx
lea edx, [eax + edx*2]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x18]
test edx, edx
jle 0x4156cc
mov edx, dword [esp + 0x58]
test edx, edx
jle 0x41562c
lea edx, [ecx + edi*2]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], eax
push 2
lea eax, [esp + 0x20]
push 3
push eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.GDI32.dll_CreatePolygonRgn]
mov edi, eax
test edi, edi
je case.default.0x4154b9
mov eax, dword [esp + 0x50]
push 2
push edi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x54]
cmp ecx, eax
je 0x415728
mov eax, dword [esp + 0x48]
inc eax
cmp eax, 4
mov dword [esp + 0x48], eax
jl 0x41549a
mov edi, dword [esp + 0x60]
mov ebx, dword [esp + 0x50]
push 1
push edi
push ebx
push ebx
call dword [sym.imp.GDI32.dll_CombineRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edi, dword [ebp + 0xc]
test ebx, ebx
je 0x415758
push ebx
push edi
call dword [sym.imp.GDI32.dll_SelectClipRgn]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esi + 0x10]
mov ebx, dword [esp + 0x6c]
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x3c]
push 0xcc0020
push 0
push 0
push ebx
push eax
mov eax, dword [esi + 0x18]
push ecx
mov ecx, dword [esp + 0x50]
push edx
add eax, ecx
push eax
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
push 0xffffffffffffffff
push edi
call dword [sym.imp.GDI32.dll_RestoreDC]
jmp case.default.0x41581e
mov cl, byte [esi + 0x40]
mov edx, dword [esp + 0x40]
mov edi, dword [esi + 0x1c]
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [esi + 0x18]
sub edx, edi
sub edx, ecx
sub edx, eax
push edx
call fcn.00410680
mov edx, dword [esi + 0x30]
mov ecx, dword [esp + 0x3c]
mov edi, eax
mov eax, dword [esi + 0x18]
add edx, ecx
push edx
lea edx, [eax + edi]
add edx, dword [esp + 0x3c]
push edx
push ecx
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x84]
add eax, ecx
push eax
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [ebp + 0x10]
lea eax, [esp + 0x78]
push eax
lea edx, [esp + 0x8c]
push ecx
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je case.default.0x41581e
mov eax, dword [esi + 0x10]
push eax
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esi + 0x34]
cmp eax, 3
ja case.default.0x41581e
jmp dword [eax*4 + 0x4159c8]
mov ecx, dword [esi + 0x30]
mov edx, dword [esp + 0x3c]
mov eax, dword [esi + 0x18]
push 0xcc0020
push 0
push 0
push ebx
push ecx
mov ecx, dword [ebp + 0xc]
push edi
push edx
mov edx, dword [esp + 0x54]
add eax, edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
jmp case.default.0x41581e
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0x30]
mov ecx, dword [esp + 0x3c]
push 0xcc0020
sub edx, edi
push 0
push edx
mov edx, dword [esi + 0x18]
push ebx
push eax
mov eax, dword [esp + 0x4c]
push edi
add edx, eax
mov eax, dword [ebp + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
jmp case.default.0x41581e
mov ecx, dword [ebp + 0xc]
push 4
push ecx
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov edx, dword [ebp + 0xc]
push 0
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_SetBrushOrgEx]
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x3c]
push 0xcc0020
push eax
push ecx
push 0
push 0
mov ecx, dword [ebp + 0xc]
push ebx
push eax
mov eax, dword [esi + 0x18]
push edi
push edx
add eax, dword [esp + 0x5c]
push eax
push ecx
call dword [sym.imp.GDI32.dll_StretchBlt]
jmp case.default.0x41581e
mov eax, dword [esi + 0x30]
mov edx, dword [esi + 0x20]
push 0xcc0020
mov ecx, dword [esi + 0x18]
push eax
push edx
push 0
mov edx, dword [ebp + 0xc]
push 0
push ebx
push eax
mov eax, dword [esp + 0x58]
push edi
mov edi, dword [esp + 0x58]
add ecx, edi
push eax
push ecx
push edx
call fcn.0041c380
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x41599f
mov edx, dword [esp + 0x40]
mov edi, dword [esi + 0x18]
mov cl, byte [esi + 0x40]
sub edx, edi
sub edx, eax
mov eax, dword [esp + 0x38]
sub edx, eax
push ecx
push edx
call fcn.00410680
mov edx, dword [esi + 0x2c]
mov ecx, dword [esp + 0x3c]
add edx, ecx
mov edi, eax
mov eax, dword [esi + 0x18]
push edx
mov edx, dword [esi + 0x1c]
add edx, eax
add eax, edi
add edx, edi
add edx, dword [esp + 0x3c]
push edx
push ecx
add eax, dword [esp + 0x44]
push eax
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x78]
push ecx
lea eax, [esp + 0x8c]
push edx
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
je 0x41599f
mov ecx, dword [esi + 0xc]
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esi + 0x2c]
push 0xcc0020
mov eax, dword [esi + 0x1c]
push 0
mov ecx, dword [esp + 0x44]
push 0
push ebx
push edx
mov edx, dword [esi + 0x18]
push eax
mov eax, dword [ebp + 0xc]
add edx, edi
mov edi, dword [esp + 0x50]
push ecx
add edx, edi
push edx
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
push 0xffffffffffffffff
push ebx
call dword [sym.imp.GDI32.dll_RestoreDC]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc