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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xec
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x40c439
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x40c439
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40c439
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x40c439
mov dl, byte [esi + 0x182]
test dl, dl
je 0x40c439
test eax, eax
jge 0x40b715
mov eax, dword [esi + 0xc]
mov dword [ebp + 0x14], eax
test ecx, ecx
jge 0x40b71f
mov ecx, dword [esi + 0x10]
mov dword [ebp + 0x18], ecx
mov eax, dword [esi + 0x14c]
mov edi, dword [esi + 0x1f0]
test eax, eax
setge byte [esp + 0x1e]
test edi, edi
push ebx
setne byte [esp + 0x23]
call dword [sym.imp.GDI32.dll_SaveDC]
test eax, eax
mov dword [esp + 0x8c], eax
je 0x40c439
mov eax, dword [ebp + 0x1c]
mov edi, dword [sym.imp.GDI32.dll_GetClipBox]
test eax, eax
je 0x40b78d
mov eax, dword [ebp + 8]
lea edx, [esp + 0xe8]
push edx
push eax
call edi
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
mov edx, dword [ebp + 8]
mov ebx, eax
push 1
push ebx
push edx
call dword [sym.imp.GDI32.dll_ExtSelectClipRgn]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ebx, dword [ebp + 8]
lea eax, [esp + 0x90]
push eax
push ebx
call edi
mov ebx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x94]
cmp ecx, ebx
mov eax, ecx
jg 0x40b7aa
mov eax, ebx
mov edx, dword [esp + 0x9c]
cmp edx, eax
jge 0x40b7bb
mov dword [esp + 0x5c], edx
jmp 0x40b7c7
cmp ecx, ebx
mov dword [esp + 0x5c], ecx
jg 0x40b7c7
mov dword [esp + 0x5c], ebx
mov edi, dword [esp + 0x90]
mov ecx, dword [ebp + 0xc]
cmp edi, ecx
mov edx, edi
jg 0x40b7d9
mov edx, ecx
mov eax, dword [esp + 0x98]
cmp eax, edx
jge 0x40b7ea
mov dword [esp + 0x58], eax
jmp 0x40b7f6
cmp edi, ecx
mov dword [esp + 0x58], edi
jg 0x40b7f6
mov dword [esp + 0x58], ecx
mov edx, dword [ebp + 0x14]
add ecx, edx
mov edx, eax
cmp eax, ecx
jl 0x40b803
mov edx, ecx
cmp edi, edx
jle 0x40b80b
mov eax, edi
jmp 0x40b811
cmp eax, ecx
jl 0x40b811
mov eax, ecx
mov ecx, dword [ebp + 0x18]
mov edi, dword [esp + 0x9c]
add ecx, ebx
mov edx, edi
cmp edi, ecx
jl 0x40b825
mov edx, ecx
mov ebx, dword [esp + 0x94]
cmp ebx, edx
jg 0x40b838
cmp edi, ecx
mov ebx, edi
jl 0x40b838
mov ebx, ecx
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
sub eax, edx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x28], eax
mov al, byte [esp + 0x1e]
sub ebx, ecx
test al, al
mov dword [esp + 0x84], ebx
jne 0x40bbfb
mov al, byte [esp + 0x1f]
test al, al
jne 0x40bbfb
mov al, byte [esi + 0x181]
test al, al
jne 0x40bbfb
mov edx, dword [ebp + 0x14]
mov eax, dword [esi + 0xc]
cmp edx, eax
jne 0x40b8c3
mov edi, dword [ebp + 0x18]
mov eax, dword [esi + 0x10]
cmp edi, eax
jne 0x40b8c3
mov ebx, dword [ebp + 8]
push 3
push ebx
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x34]
mov edx, dword [ebp + 0x14]
push 0
push eax
mov eax, dword [ebp + 0x10]
push ecx
mov ecx, dword [ebp + 0xc]
push edi
push 0
push 0
push 0
push edi
push edx
push eax
push ecx
push ebx
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
jmp 0x40c3ee
mov edx, dword [esp + 0x28]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0xa8]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xa8], 0x28
push eax
mov dword [esp + 0xb0], edx
mov dword [esp + 0xb4], ebx
mov word [esp + 0xb8], 1
mov word [esp + 0xba], 0x18
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
lea ecx, [esp + 0x3c]
push 0
mov edi, eax
mov eax, dword [ebp + 8]
push ecx
lea edx, [esp + 0xb4]
push 0
push edx
push eax
mov dword [esp + 0x64], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40bbb6
fild dword [esi + 0xc]
mov eax, dword [esp + 0x28]
fidiv dword [ebp + 0x14]
lea ecx, [eax + eax*2]
lea eax, [ecx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
test ebx, ebx
mov dword [esp + 0x68], eax
fstp dword [esp + 0x40]
fild dword [esi + 0x10]
fidiv dword [ebp + 0x18]
fstp dword [esp + 0x50]
jle 0x40bbb6
mov edx, dword [esp + 0x64]
mov dword [esp + 0x20], 0
mov dword [esp + 0x44], edx
mov dword [esp + 0x54], ebx
mov eax, dword [esp + 0x44]
mov edx, dword [ebp + 0x10]
fild dword [esi + 0x10]
sub eax, edx
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fmul dword [esp + 0x50]
fsubp st(1)
fst dword [esp + 0x3c]
fstp qword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
test eax, eax
jge 0x40b9d9
xor eax, eax
jmp 0x40b9e9
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0x34]
imul ecx, eax
add ecx, edx
mov edx, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x20]
test eax, eax
lea ebx, [ecx + edx]
mov dword [esp + 0x24], 0
jle 0x40bb90
mov eax, dword [esp + 0x24]
mov edi, dword [ebp + 0xc]
mov edx, dword [esp + 0x58]
sub eax, edi
add eax, edx
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
fmul dword [esp + 0x40]
fst dword [esp + 0x34]
fstp qword [esp + 0x10]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push edi
push ecx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
test eax, eax
jge 0x40ba5e
xor eax, eax
jmp 0x40ba72
mov edx, dword [esp + 0x10]
push edi
push edx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov cl, byte [ebp + 0x20]
test cl, cl
je 0x40bb1e
fld dword [esp + 0x40]
fcomp dword [0x5565d0]
fnstsw ax
test ah, 0x41
jne 0x40bae5
fld dword [esp + 0x50]
fcomp dword [0x5565d0]
fnstsw ax
test ah, 0x41
jne 0x40bae5
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x40]
fld dword [esp + 0x3c]
fsub dword [0x5565c0]
push 0
push 5
push 2
push eax
push ecx
push ecx
lea edx, [esp + 0xa0]
fstp dword [esp]
fld dword [esp + 0x4c]
fsub dword [0x5565c0]
push ecx
mov ecx, esi
fstp dword [esp]
push edx
call fcn.0040f6f0
mov eax, dword [eax]
mov dword [esp + 0xc], eax
jmp 0x40bb66
fld dword [esp + 0x3c]
fsub dword [0x5565c0]
push 0
push 5
push 2
push ecx
fstp dword [esp]
fld dword [esp + 0x44]
fsub dword [0x5565c0]
push ecx
lea ecx, [esp + 0x94]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.0040ddb0
mov edx, dword [eax]
mov dword [esp + 0xc], edx
jmp 0x40bb66
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x40bb47
mov ecx, dword [esp + 0x2c]
push ecx
push eax
mov ecx, esi
call fcn.0040c540
lea edx, [esp + 0x78]
push eax
push edx
mov ecx, esi
call fcn.0040c4d0
mov eax, dword [eax]
mov dword [esp + 0xc], eax
jmp 0x40bb66
mov ecx, dword [esp + 0x6c]
lea edx, [ecx + eax*2]
mov cl, byte [eax + edx]
add eax, edx
mov dl, byte [eax + 1]
inc eax
mov byte [esp + 0xc], cl
mov byte [esp + 0xd], dl
mov al, byte [eax + 1]
mov byte [esp + 0xe], al
mov cl, byte [esp + 0xc]
mov dl, byte [esp + 0xd]
mov al, byte [esp + 0xe]
mov byte [ebx], cl
inc ebx
mov ecx, dword [esp + 0x28]
mov byte [ebx], dl
inc ebx
mov byte [ebx], al
mov eax, dword [esp + 0x24]
inc ebx
inc eax
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x40ba1b
mov edi, dword [esp + 0x44]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x54]
dec edi
add edx, ecx
dec eax
mov dword [esp + 0x44], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x54], eax
jne 0x40b997
mov eax, dword [esp + 0x38]
lea edx, [esp + 0xa8]
push 0
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x64]
push eax
mov eax, dword [esp + 0x90]
push eax
push 0
push 0
push 0
push eax
mov eax, dword [esp + 0x78]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
mov edx, dword [esp + 0x70]
mov esi, dword [esp + 0x4c]
push edx
jmp 0x40c3d9
lea eax, [esp + 0x68]
mov ecx, esi
push eax
mov byte [esp + 0x14], 0
mov byte [esp + 0x15], 0
mov byte [esp + 0x16], 0
mov byte [esp + 0x17], 0
call fcn.0040b0e0
mov ecx, esi
call fcn.0040b120
mov edx, dword [ebp + 8]
mov dword [esp + 0x70], eax
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0xa8]
push edx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x44], 0
mov dword [esp + 0xac], 0x28
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], ebx
mov word [esp + 0xb8], 1
mov word [esp + 0xba], 0x18
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edx, dword [ebp + 8]
mov edi, eax
push 0
lea eax, [esp + 0x54]
push 0
push eax
lea ecx, [esp + 0xb4]
push 0
push ecx
push edx
mov dword [esp + 0xa0], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x58]
mov edx, dword [ebp + 8]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x5c]
push 0xcc0020
push eax
mov eax, dword [esp + 0x30]
push ecx
push edx
push ebx
push eax
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x50]
test eax, eax
je 0x40c393
mov eax, dword [esp + 0x28]
lea ecx, [eax + eax*2]
lea eax, [ecx*8 + 0x1f]
mov ecx, dword [ebp + 0x14]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x6c], eax
mov eax, dword [esi + 0xc]
cmp ecx, eax
mov dword [esp + 0x30], eax
jne 0x40bf4b
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp + 0x18]
cmp ecx, eax
jne 0x40bf4b
mov edi, dword [esp + 0x64]
mov edx, dword [ebp + 0x10]
sub eax, edi
add eax, edx
test ebx, ebx
mov dword [esp + 0x24], eax
jle 0x40c393
mov edx, dword [esp + 0x58]
mov ecx, dword [ebp + 0xc]
sub edx, ecx
xor edi, edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x4c], ebx
jmp 0x40bd50
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x50]
mov ebx, eax
add edi, ecx
mov ecx, dword [esi + 0x30]
imul ebx, dword [esi + 0xc]
imul ecx, eax
lea eax, [edx + edx*2]
mov dword [esp + 0x74], ebx
add ecx, eax
mov eax, dword [esi + 0x34]
add ecx, eax
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x3c], ecx
jle 0x40bf20
mov ecx, eax
mov dword [esp + 0x34], ecx
jmp 0x40bd94
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x74]
mov al, byte [esp + 0x1f]
test al, al
je 0x40bdad
mov eax, dword [esi + 0x1f0]
add eax, edx
mov cl, byte [eax + ebx]
mov byte [esp + 0xc], cl
jmp 0x40bdb2
mov byte [esp + 0xc], 0xff
mov edx, dword [esp + 0xc]
xor ebx, ebx
mov bl, byte [esi + 0x180]
and edx, 0xff
inc ebx
mov eax, dword [esi + 0x28]
imul ebx, edx
sar ebx, 8
test eax, eax
mov byte [esp + 0xc], bl
je 0x40be2e
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
mov ecx, esi
call fcn.0040c540
and eax, 0xff
lea edx, [esp + 0x78]
push eax
push edx
mov ecx, esi
mov dword [esp + 0x48], eax
call fcn.0040c4d0
mov cl, byte [esi + 0x181]
mov eax, dword [eax]
test cl, cl
mov dword [esp + 0x10], eax
je 0x40be50
mov ebx, dword [esp + 0x13]
mov ecx, dword [esp + 0xc]
and ebx, 0xff
and ecx, 0xff
inc ebx
imul ebx, ecx
sar ebx, 8
mov byte [esp + 0xc], bl
jmp 0x40be50
mov eax, dword [esp + 0x3c]
mov dl, byte [eax]
mov cl, byte [eax + 1]
inc eax
mov byte [esp + 0x10], dl
inc eax
mov byte [esp + 0x11], cl
mov dl, byte [eax]
inc eax
mov byte [esp + 0x12], dl
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x40be65
mov edx, dword [esp + 0x70]
cmp dword [esp + 0x40], edx
jne 0x40be77
test ecx, ecx
jne 0x40be6b
cmp eax, dword [esp + 0x68]
jne 0x40be77
mov cl, byte [esp + 0x1e]
test cl, cl
jne 0x40bf05
test bl, bl
je 0x40bf05
cmp bl, 0xff
jne 0x40be9b
mov al, byte [esp + 0x10]
mov cl, byte [esp + 0x11]
mov dl, byte [esp + 0x12]
mov byte [edi], al
inc edi
mov byte [edi], cl
inc edi
mov byte [edi], dl
inc edi
jmp 0x40bf08
mov ecx, dword [esp + 0xc]
and eax, 0xff
not bl
mov byte [esp + 0x54], bl
xor ebx, ebx
mov edx, dword [esp + 0x54]
mov bl, byte [edi]
and ecx, 0xff
and edx, 0xff
imul eax, ecx
imul ebx, edx
add eax, ebx
xor ebx, ebx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x11]
mov bl, byte [edi + 1]
inc edi
and eax, 0xff
imul ebx, edx
imul eax, ecx
add eax, ebx
sar eax, 8
mov byte [edi], al
mov eax, dword [esp + 0x12]
and eax, 0xff
inc edi
imul eax, ecx
xor ecx, ecx
mov cl, byte [edi]
imul ecx, edx
add eax, ecx
sar eax, 8
mov byte [edi], al
inc edi
jmp 0x40bf08
add edi, 3
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
inc ecx
dec eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x34], eax
jne 0x40bd8c
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x6c]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x4c]
add edi, ebx
inc eax
dec ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x4c], ecx
jne 0x40bd4c
jmp 0x40c393
fild dword [esp + 0x30]
test ebx, ebx
fidiv dword [ebp + 0x14]
fstp dword [esp + 0x20]
fild dword [esi + 0x10]
fidiv dword [ebp + 0x18]
fstp dword [esp + 0x38]
jle 0x40c393
mov edx, dword [esp + 0x64]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x34]
mov edx, dword [ebp + 0x10]
fild dword [esi + 0x10]
sub eax, edx
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fmul dword [esp + 0x38]
fsubp st(1)
fst dword [esp + 0x44]
fstp qword [esp + 0x78]
mov edi, dword [esp + 0x7c]
mov ebx, dword [esp + 0x78]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
test eax, eax
jge 0x40bfbe
xor eax, eax
jmp 0x40bfce
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov ecx, eax
mov edx, dword [esp + 0x50]
imul ecx, dword [esi + 0xc]
mov dword [esp + 0x74], ecx
mov ecx, dword [esp + 0x3c]
add ecx, edx
mov edx, dword [esi + 0x34]
mov dword [esp + 0x48], ecx
mov ecx, dword [esi + 0x30]
imul ecx, eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x28]
add ecx, edx
mov dword [esp + 0x2c], 0
test eax, eax
mov dword [esp + 0x78], ecx
jle 0x40c36d
mov eax, dword [esp + 0x2c]
mov edi, dword [ebp + 0xc]
mov edx, dword [esp + 0x58]
sub eax, edi
add eax, edx
mov dword [esp + 0x24], eax
fild dword [esp + 0x24]
fmul dword [esp + 0x20]
fst dword [esp + 0x24]
fstp qword [esp + 0xa0]
mov edi, dword [esp + 0xa4]
mov ebx, dword [esp + 0xa0]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
test eax, eax
jge 0x40c059
xor edi, edi
jmp 0x40c06b
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_floor]
add esp, 8
call sub.MSVCRT.dll__ftol
mov edi, eax
mov al, byte [esp + 0x1f]
test al, al
je 0x40c088
mov ecx, dword [esi + 0x1f0]
mov edx, dword [esp + 0x74]
add ecx, edi
mov al, byte [ecx + edx]
mov byte [esp + 0xc], al
jmp 0x40c08d
mov byte [esp + 0xc], 0xff
mov ecx, dword [esp + 0xc]
xor ebx, ebx
mov bl, byte [esi + 0x180]
and ecx, 0xff
inc ebx
mov eax, dword [esi + 0x28]
imul ebx, ecx
sar ebx, 8
test eax, eax
mov byte [esp + 0xc], bl
je 0x40c1bd
mov edx, dword [esp + 0x4c]
mov ecx, esi
push edx
push edi
call fcn.0040c540
and eax, 0xff
mov dword [esp + 0x40], eax
mov al, byte [ebp + 0x20]
test al, al
je 0x40c168
fld dword [esp + 0x20]
fcomp dword [0x5565d0]
fnstsw ax
test ah, 0x41
jne 0x40c135
fld dword [esp + 0x38]
fcomp dword [0x5565d0]
fnstsw ax
test ah, 0x41
jne 0x40c135
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x20]
fld dword [esp + 0x44]
fsub dword [0x5565c0]
push 0
push 5
push 2
push eax
push ecx
push ecx
lea edx, [esp + 0xf4]
fstp dword [esp]
fld dword [esp + 0x3c]
fsub dword [0x5565c0]
push ecx
mov ecx, esi
fstp dword [esp]
push edx
call fcn.0040f6f0
jmp 0x40c185
fld dword [esp + 0x44]
fsub dword [0x5565c0]
push 0
push 5
push 2
push ecx
lea eax, [esp + 0xf0]
fstp dword [esp]
fld dword [esp + 0x34]
fsub dword [0x5565c0]
push ecx
mov ecx, esi
fstp dword [esp]
push eax
call fcn.0040ddb0
jmp 0x40c185
mov ecx, dword [esp + 0x4c]
push ecx
push edi
mov ecx, esi
call fcn.0040c540
lea edx, [esp + 0xd4]
push eax
push edx
mov ecx, esi
call fcn.0040c4d0
mov cl, byte [esi + 0x181]
mov eax, dword [eax]
test cl, cl
mov dword [esp + 0x10], eax
je 0x40c288
mov ebx, dword [esp + 0x13]
mov ecx, dword [esp + 0xc]
and ebx, 0xff
and ecx, 0xff
inc ebx
imul ebx, ecx
sar ebx, 8
mov byte [esp + 0xc], bl
jmp 0x40c288
mov al, byte [ebp + 0x20]
test al, al
je 0x40c266
fld dword [esp + 0x20]
fcomp dword [0x5565d0]
fnstsw ax
test ah, 0x41
jne 0x40c22d
fld dword [esp + 0x38]
fcomp dword [0x5565d0]
fnstsw ax
test ah, 0x41
jne 0x40c22d
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
fld dword [esp + 0x44]
fsub dword [0x5565c0]
push 0
push 5
push 2
push edx
push eax
push ecx
fstp dword [esp]
fld dword [esp + 0x3c]
fsub dword [0x5565c0]
push ecx
lea ecx, [esp + 0x100]
fstp dword [esp]
push ecx
mov ecx, esi
call fcn.0040f6f0
mov eax, dword [eax]
mov dword [esp + 0x10], eax
jmp 0x40c288
fld dword [esp + 0x44]
fsub dword [0x5565c0]
push 0
push 5
push 2
push ecx
lea edx, [esp + 0xe8]
fstp dword [esp]
fld dword [esp + 0x34]
fsub dword [0x5565c0]
push ecx
mov ecx, esi
fstp dword [esp]
push edx
call fcn.0040ddb0
mov eax, dword [eax]
mov dword [esp + 0x10], eax
jmp 0x40c288
mov eax, dword [esp + 0x78]
lea ecx, [eax + edi*2]
add edi, ecx
mov cl, byte [edi + 2]
mov byte [esp + 0x12], cl
mov dl, byte [edi]
mov al, byte [edi + 1]
inc edi
mov byte [esp + 0x10], dl
mov byte [esp + 0x11], al
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x40c29f
mov edx, dword [esp + 0x70]
mov edi, dword [esp + 0x40]
cmp edi, edx
jne 0x40c2b1
test ecx, ecx
jne 0x40c2a5
cmp eax, dword [esp + 0x68]
jne 0x40c2b1
mov cl, byte [esp + 0x1e]
test cl, cl
jne 0x40c34d
test bl, bl
je 0x40c34d
cmp bl, 0xff
jne 0x40c2d9
mov eax, dword [esp + 0x48]
mov cl, byte [esp + 0x10]
mov dl, byte [esp + 0x11]
mov byte [eax], cl
mov cl, byte [esp + 0x12]
inc eax
mov byte [eax], dl
inc eax
mov byte [eax], cl
inc eax
jmp 0x40c354
mov edi, dword [esp + 0xc]
mov edx, eax
mov eax, dword [esp + 0x48]
and edi, 0xff
not bl
mov byte [esp + 0x54], bl
xor ebx, ebx
mov ecx, dword [esp + 0x54]
mov bl, byte [eax]
and ecx, 0xff
and edx, 0xff
imul edx, edi
imul ebx, ecx
add edx, ebx
xor ebx, ebx
sar edx, 8
mov byte [eax], dl
mov edx, dword [esp + 0x11]
mov bl, byte [eax + 1]
inc eax
and edx, 0xff
imul ebx, ecx
imul edx, edi
add edx, ebx
xor ebx, ebx
sar edx, 8
mov byte [eax], dl
mov edx, dword [esp + 0x12]
mov bl, byte [eax + 1]
inc eax
and edx, 0xff
imul ebx, ecx
imul edx, edi
add edx, ebx
sar edx, 8
mov byte [eax], dl
inc eax
jmp 0x40c354
mov eax, dword [esp + 0x48]
add eax, 3
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x2c]
inc eax
cmp eax, ecx
mov dword [esp + 0x2c], eax
jl 0x40c00d
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
add ecx, eax
mov eax, dword [esp + 0x30]
dec edx
dec eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x30], eax
jne 0x40bf7c
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x84]
lea ecx, [esp + 0xa8]
push 0
push ecx
mov ecx, dword [esp + 0x64]
push edx
mov edx, dword [esp + 0x64]
push eax
push 0
push 0
push 0
push eax
mov eax, dword [esp + 0x48]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
mov ecx, dword [esp + 0x80]
mov esi, dword [esp + 0x88]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x40c419
lea edx, [esp + 0xe8]
push edx
call dword [sym.imp.GDI32.dll_CreateRectRgnIndirect]
mov esi, eax
mov eax, dword [ebp + 8]
push 2
push esi
push eax
call dword [sym.imp.GDI32.dll_ExtSelectClipRgn]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x8c]
mov edx, dword [ebp + 8]
push ecx
push edx
call dword [sym.imp.GDI32.dll_RestoreDC]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x1c